Java 2D Graphics Color

Java examples for 2D Graphics:Color


Click the following links for the tutorial for 2D Graphics and Color.

  1. Changing drawing colors.
  2. Drawing with Color
  3. Get Transparency Mode Of Color
  4. Set Graphics Color
  5. Drawing with a cyclic and non-cyclic Gradient Color
  6. get OpenGL Color
  7. calculate Color from primary and secondary color and ratio
  8. get Grey Color

  9. distance between two color
  10. get Color in Shape
  11. get Css Color
  12. returns a r g b a float array that openGL likes
  13. Gets a color composed of the specified channels.
  14. Returns the green channel of the color
  15. get Appointment Color
  16. Take the integer part of a number and put it in [0, 255] That is to say if integer<0, return 0.

  17. mix Colors
  18. random Color
  19. Color from AARRGGBB
  20. random Color and return Color value
  21. seeded Color
  22. towards Gray Color
  23. Return the "distance" between two colors.
  24. get Nice Colors
  25. add one color to another color
  26. Fills given rectangle using top-down gradient fill of specified colors
  27. Fills given rectangle using top-down gradient fill of specified colors
  28. get Color Hue
  29. distance between two Color value
  30. add Colors
  31. scale Color
  32. Return the "distance" between two colors.
  33. get Random Color Code
  34. Returns a Color for an object that is determined by the object's hash code.
  35. get Mixed Color
  36. blur Color
  37. Converts the colour to an integer value.
  38. get Background Color Random
  39. get Saturation
  40. adjust Color By
  41. adjust Color Components Towards
  42. adjust Color Towards by amount
  43. average Color Difference
  44. Fills given rectangle using top-down gradient fill of specified colors
  45. Get random color using Golden Ratio
  46. Computes an appropriate foreground color (either white or black) for the given background color.
  47. Returns a new color equal to the old one, except the saturation is set to the new value.
  48. Converts the given FX color to awt color.
  49. set Saturation
  50. merge Colors
  51. Creates a color that corresponds to the specified values.
  52. Extracts the green component from color .
  53. get Fraction Color
  54. convert To Binary Colors
  55. Gets the "distance" between two colors, returning between 0 and 255.
  56. Checks if two colors are within a tolerance.
  57. get Contrast Color
  58. parse Color
  59. distance of two color
  60. get Random Color
  61. are Colors Within Tolerance
  62. find All Color Within Tolerance
  63. find Color Within Tolerance
  64. Gets the "distance" between two colors, their components assumed to be points in 3D space ranging from 0.0 to 1.0.
  65. Converts a float value between 0f and 1f to an int value between 0 and 255
  66. get Random Color by base color
  67. average Color
  68. Bounds a color parameter to between 0 and 255 (both inclusive).
  69. format Color
  70. Computes the luminance difference of two colors (a value in range 0-255).
  71. Computes the luminance value of a color (a value in range 0-255).
  72. Tests whether the given colors are contrasting colors, according to the test described in the W3C accessibility evaluation working draft
  73. Color to Byte
  74. Finds the closest hue possible to given color.
  75. Return the "distance" between two colors.
  76. inverse Color
  77. Gets the java color corresponding to the given CSS color name.
  78. Mixes two colour by the provided percentages
  79. Shades a colour by the given amount (0-1).
  80. convert Color To Gray
  81. Computes cosine for some angle represented in degrees [0, 360].
  82. Calculates the hue component based on R,G,B
  83. get Randomized Maximum Contrast Color List
  84. different Color
  85. get Green from int color
  86. get Color Difference
  87. Multiplies each of component of colour with amount and divides the result by 256.
  88. Returns white or black text depending on the background.