7/18/2023 0 Comments Colorset idl![]() Static ColorSpace create ( CSSOMString name, ColorSpaceOptions options ) Creates a new ColorSpace object and registers it Static undefined register ( ColorSpace colorspace ) Readonly attribute ColorSpaceWhitePoint white Ĭonstructor ( CSSOMString name, ColorSpaceOptions options ) ![]() Or allow authors to define their own methods. Which is a slower but more accurate method.įuture versions of this specification may add additional methods, The value "2000" corresponds to the deltaE 2000 method, The value "76" corresponds to the deltaE 76 method, If we keep it an enum, the only way to add custom deltaE methodsĬallback relativeCoordCallback = double ( double coord ) Ĭalculate the color difference between this and color using the method specified by deltaEMethod (see prose below) TODO: we want authors to be able to extend this Optional ( CSSOMString or ColorSpace) colorSpace ,ĭouble deltaE ( Color color, optional DeltaEMethod method ) Bring a color into gamut of a given colorspace Check whether a color is in gamut of a given color spaceīoolean inGamut( optional CSSOMString colorspace ) Get/set coordinates (in this or other color spaces)ĭouble get (( CSSOMString or ColorSpace) colorSpace, ( CSSOMString or unsigned short) coord ) ĭouble get(( CSSOMString or unsigned short) coord ) Ĭolor set (( CSSOMString or ColorSpace) colorSpace, object values ) Clone color instance or create from JSON-style objectĬonstructor (( Color or CSSColorValue or ColorJSON) color ) ( CSSOMString or ColorSpace) colorSpace , The API presented in this document aims to address all of the common use cases,Īnd provide extensibility points to enable more complex use cases to be expressed. Or interpolating two colors (regardless of what color space they are specified in). Such as manipulating components in a variety of color spaces,Įvaluating whether color pairs have sufficient contrast, ![]() In a format more structured than CSS strings.įurthermore, authors often need to perform computations on color values, Many APIs on the Web platform need to be able to accept color input
0 Comments
Leave a Reply. |