Tabnine Logo
Utils.readHex
Code IndexAdd Tabnine to your IDE (free)

How to use
readHex
method
in
org.jflux.api.common.rk.utils.Utils

Best Java code snippets using org.jflux.api.common.rk.utils.Utils.readHex (Showing top 2 results out of 315)

origin: org.jflux/org.jflux.api.common.rk

/**
 * Returns the decimal value of a two character hex string.
 * @param xx two character hex string [0-9a-fA-F]
 * @return an value 0-255
 */
public static int readHex(String xx){
  int high = readHex(xx.charAt(0));
  high *= 16;
  int low = readHex(xx.charAt(1));
  return high+low;
}
/**
origin: org.jflux/org.jflux.extern.utils.apache_commons_configuration.rk

  return Color.decode(colStr);
}else if(len == 4){
  int r = Utils.readHex(colStr.charAt(1))*17;
  int g = Utils.readHex(colStr.charAt(1))*17;
  int b = Utils.readHex(colStr.charAt(1))*17;
  int a = Utils.readHex(colStr.charAt(1))*17;
  return new Color(r, g, b, a);
}else{
  int r = Utils.readHex(colStr.substring(1, 3));
  int g = Utils.readHex(colStr.substring(3, 5));
  int b = Utils.readHex(colStr.substring(5, 7));
  int a = Utils.readHex(colStr.substring(7, 9));
  return new Color(r, g, b, a);
org.jflux.api.common.rk.utilsUtilsreadHex

Javadoc

Converts the characters '0'-'9' (48-58), 'A'-'F' (65-70), and 'a'-'f' (32-37) or to the decimal value of their corresponding hex values.

Popular methods of Utils

  • bound
    Ensures: low <= n <= high

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • JFileChooser (javax.swing)
  • JTable (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now