API Reference
Class
OfficeColorSpaceConverter
Dependency-free conversion from common device and calibrated color spaces to sRGB.
Inheritance
- Object
- OfficeColorSpaceConverter
Methods
public static OfficeColor FromCalibratedGray(Double gray, Double whiteX, Double whiteY, Double whiteZ, Double gamma = 1) #Returns:
OfficeColorConverts a calibrated gray component and gamma using an explicit XYZ white point.
Parameters
- gray System.Double
- whiteX System.Double
- whiteY System.Double
- whiteZ System.Double
- gamma System.Double = 1
public static OfficeColor FromCalibratedRgb(Double red, Double green, Double blue, Double whiteX, Double whiteY, Double whiteZ, IReadOnlyList<Double> gamma = null, IReadOnlyList<Double> matrix = null) #Returns:
OfficeColorConverts calibrated RGB through per-channel gamma and a nine-value column-major XYZ matrix. Missing gamma and matrix values use PDF-compatible identity defaults.
Parameters
- red System.Double
- green System.Double
- blue System.Double
- whiteX System.Double
- whiteY System.Double
- whiteZ System.Double
- gamma System.Collections.Generic.IReadOnlyList{System.Double} = null
- matrix System.Collections.Generic.IReadOnlyList{System.Double} = null
public static OfficeColor FromCmyk(Double cyan, Double magenta, Double yellow, Double black) #Returns:
OfficeColorConverts normalized subtractive device components to sRGB.
Parameters
- cyan System.Double
- magenta System.Double
- yellow System.Double
- black System.Double
FromLab 2 overloads
public static OfficeColor FromLab(Double lightness, Double a, Double b) #Returns:
OfficeColorConverts CIE L*a*b* using the D50 reference white to sRGB.
Parameters
- lightness System.Double
- a System.Double
- b System.Double
public static OfficeColor FromLab(Double lightness, Double a, Double b, Double whiteX, Double whiteY, Double whiteZ) #Returns:
OfficeColorConverts CIE L*a*b* using an explicit XYZ reference white to sRGB.
Parameters
- lightness System.Double
- a System.Double
- b System.Double
- whiteX System.Double
- whiteY System.Double
- whiteZ System.Double
public static OfficeColor FromLinearSrgb(Double red, Double green, Double blue) #Returns:
OfficeColorConverts linear-light sRGB components to encoded sRGB.
Parameters
- red System.Double
- green System.Double
- blue System.Double
public static OfficeColor FromOklab(Double lightness, Double a, Double b) #Returns:
OfficeColorConverts OKLab coordinates to encoded sRGB.
Parameters
- lightness System.Double
- a System.Double
- b System.Double
public static OfficeColor FromXyz(Double x, Double y, Double z, Double sourceWhiteX = 0.95047, Double sourceWhiteY = 1, Double sourceWhiteZ = 1.08883) #Returns:
OfficeColorConverts XYZ values relative to an explicit source white point to sRGB.
Parameters
- x System.Double
- y System.Double
- z System.Double
- sourceWhiteX System.Double = 0.95047
- sourceWhiteY System.Double = 1
- sourceWhiteZ System.Double = 1.08883
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object