Packages

final class ColorConverter extends AnyRef

Color converter based on information given at brucelindbloom.com.

Conversion between CIE XYZ and sRGB is defined in the IEC 619602-1 standard http://www.colour.org/tc8-05/Docs/colorspace/61966-2-1.pdf, though it uses approximated coefficients (compared to Lindbloom).

Conversion between CIE XYZ and reference white points are defined in NIST E308 standard.

Linear Supertypes
AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ColorConverter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ColorConverter(refWhite: ReferenceWhite = ReferenceWhite.D65, rgbSpace: RGBWorkingSpace = RGBWorkingSpace.sRGB, chromaticAdaptation: Option[ChromaticAdaptation] = Some(ChromaticAdaptation.Bradford), rgbScale: Double = 255, xyzScale: Double = 100)

    refWhite

    reference white for CIE XYZ color space.

    rgbSpace

    RGB working space (may have different reference white).

    chromaticAdaptation

    chromatic adaptation used for conversions from/to RGB.

    rgbScale

    scale used for RGB values, for instance, if scale is 255 the range of RGB values will be between 0 and 255.

    xyzScale

    scale used for CIE XYZ values, for instance, if scale is 100 the range of CIE XYZ values will be between 0 and 100.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val chromaticAdaptation: Option[ChromaticAdaptation]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def copyWith(refWhite: ReferenceWhite = refWhite, rgbSpace: RGBWorkingSpace = rgbSpace, chromaticAdaptation: Option[ChromaticAdaptation] = chromaticAdaptation, rgbScale: Double = rgbScale, xyzScale: Double = xyzScale): ColorConverter

    Create copy of this object with a modified field.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def labToXYZ(l: Double, a: Double, b: Double): XYZ

    Convert color from CIE L*a*b* to CIE XYZ color space.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. val refWhite: ReferenceWhite
  18. val rgbScale: Double
  19. val rgbSpace: RGBWorkingSpace
  20. def rgbToXYZ(r: Double, g: Double, b: Double): XYZ

    Convert RGB to CIE XYZ color space.

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toLab(xyz: XYZ): Lab

    Convert CIE XYZ to CIE L*a*b* color space.

    Convert CIE XYZ to CIE L*a*b* color space.

    Annotations
    @inline()
  23. def toLab(rgb: RGB): Lab

    Convert color from RGB to CIE L*a*b* color space.

    Convert color from RGB to CIE L*a*b* color space.

    Annotations
    @inline()
  24. def toRGB(xyz: XYZ): RGB

    Convert CIE XYZ to an RGB color space.

    Convert CIE XYZ to an RGB color space.

    Annotations
    @inline()
  25. def toRGB(lab: Lab): RGB

    Convert color from CIE L*a*b* to RGB color space.

    Convert color from CIE L*a*b* to RGB color space.

    Annotations
    @inline()
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. def toXYZ(rgb: RGB): XYZ

    Convert RGB to CIE XYZ color space.

    Convert RGB to CIE XYZ color space.

    Annotations
    @inline()
  28. def toXYZ(lab: Lab): XYZ

    Convert color from CIE L*a*b* to CIE XYZ color space.

    Convert color from CIE L*a*b* to CIE XYZ color space.

    Annotations
    @inline()
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. val xyzScale: Double
  33. def xyzToLab(x: Double, y: Double, z: Double): Lab

    Convert CIE XYZ to CIE L*a*b* color space.

  34. def xyzToRGB(x: Double, y: Double, z: Double): RGB

    Convert CIE XYZ to an RGB color space.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped