java.awt.color


1. Creating a ColorSpace Object

ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);

2. Converting a Color to a Different ColorSpace

float[] components = {0.5f, 0.5f, 0.5f};
Color color = new Color(components, cs);

3. Getting the Components of a Color

float[] components = color.getComponents(null);

4. Getting the Alpha Component of a Color

float alpha = color.getAlpha();

5. Getting the Red Component of a Color

float red = color.getRed();

6. Getting the Green Component of a Color

float green = color.getGreen();

7. Getting the Blue Component of a Color

float blue = color.getBlue();

8. Creating a Color Space Converter

ColorSpaceConverter csc = ColorSpaceConverter.getInstance(cs, ColorSpace.CS_GRAY);

9. Converting a Color from One Color Space to Another

10. Getting the Color Model of a Color Space

11. Getting the Number of Components in a Color Space

12. Getting the Type of a Color Space

13. Creating a ColorTransform Object

14. Transforming a Color from One Color Space to Another

15. Getting the Color Transform Result

16. Getting the Source Color Space of a Color Transform

17. Getting the Destination Color Space of a Color Transform

18. Creating a ProfileData

19. Getting the ICC Profile Data for a Color Space

20. Getting the Color Space for an ICC Profile Data

21. Creating a ColorConverter

22. Converting a Color from One Color Space to Another

23. Getting the Source Color Space of a ColorConverter

24. Getting the Destination Color Space of a ColorConverter

25. Creating a ColorExchange

26. Converting a Color from One Color Space to Another

27. Getting the Source Color Space of a ColorExchange

28. Getting the Destination Color Space of a ColorExchange

29. Creating a ColorCorrection

30. Adjusting the Brightness of a Color

31. Adjusting the Contrast of a Color

32. Adjusting the Hue of a Color

33. Adjusting the Saturation of a Color

34. Creating a ColorFilter

35. Filtering a Color

36. Getting the Transfer Function of a Color Filter

37. Creating a ColorLookupTable

38. Setting the Transfer Function of a ColorLookupTable

39. Lookup a Color in a ColorLookupTable

Last updated