Home
last modified time | relevance | path

Searched refs:hsv (Results 1 – 25 of 37) sorted by relevance

12

/third_party/skia/third_party/externals/oboe/samples/RhythmGame/third_party/glm/gtx/
Dcolor_space.inl9 tvec3<T, P> hsv = hsvColor; local
12 if(hsv.y == static_cast<T>(0))
14 rgbColor = tvec3<T, P>(hsv.z);
17 T sector = floor(hsv.x / T(60));
18 T frac = (hsv.x / T(60)) - sector;
20 T o = hsv.z * (T(1) - hsv.y);
21 T p = hsv.z * (T(1) - hsv.y * frac);
22 T q = hsv.z * (T(1) - hsv.y * (T(1) - frac));
28 rgbColor.r = hsv.z;
34 rgbColor.g = hsv.z;
[all …]
/third_party/flutter/skia/src/core/
DSkColor.cpp33 void SkRGBToHSV(U8CPU r, U8CPU g, U8CPU b, SkScalar hsv[3]) { in SkRGBToHSV()
34 SkASSERT(hsv); in SkRGBToHSV()
44 hsv[0] = 0; in SkRGBToHSV()
45 hsv[1] = 0; in SkRGBToHSV()
46 hsv[2] = v; in SkRGBToHSV()
68 hsv[0] = h; in SkRGBToHSV()
69 hsv[1] = s; in SkRGBToHSV()
70 hsv[2] = v; in SkRGBToHSV()
73 SkColor SkHSVToColor(U8CPU a, const SkScalar hsv[3]) { in SkHSVToColor()
74 SkASSERT(hsv); in SkHSVToColor()
[all …]
/third_party/skia/src/core/
DSkColor.cpp34 void SkRGBToHSV(U8CPU r, U8CPU g, U8CPU b, SkScalar hsv[3]) { in SkRGBToHSV()
35 SkASSERT(hsv); in SkRGBToHSV()
45 hsv[0] = 0; in SkRGBToHSV()
46 hsv[1] = 0; in SkRGBToHSV()
47 hsv[2] = v; in SkRGBToHSV()
69 hsv[0] = h; in SkRGBToHSV()
70 hsv[1] = s; in SkRGBToHSV()
71 hsv[2] = v; in SkRGBToHSV()
74 SkColor SkHSVToColor(U8CPU a, const SkScalar hsv[3]) { in SkHSVToColor()
75 SkASSERT(hsv); in SkHSVToColor()
[all …]
/third_party/flutter/skia/docs/examples/
DHSVToColor_2.cpp11 SkScalar hsv[3]; in draw() local
12 SkColorToHSV(color, hsv); in draw()
13 hsv[0] = hsv[0] + 90 >= 360 ? hsv[0] - 270 : hsv[0] + 90; in draw()
15 paint.setColor(SkHSVToColor(hsv)); in draw()
DHSVToColor.cpp11 SkScalar hsv[3]; in draw() local
12 SkColorToHSV(color, hsv); in draw()
13 hsv[0] = hsv[0] + 90 >= 360 ? hsv[0] - 270 : hsv[0] + 90; in draw()
15 paint.setColor(SkHSVToColor((x + y) % 256, hsv)); in draw()
DColorToHSV.cpp10 SkScalar hsv[3]; in draw() local
11 SkColorToHSV(source.getColor(x, y), hsv); in draw()
12 hsv[1] = 1 - hsv[1]; in draw()
14 paint.setColor(SkHSVToColor(hsv)); in draw()
DRGBToHSV.cpp12 SkScalar hsv[3];
14 SkRGBToHSV(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c), hsv);
15 canvas->drawString(("h: " + std::to_string(hsv[0]).substr(0, 6)).c_str(), 27, 45, SkPaint());
16 canvas->drawString(("s: " + std::to_string(hsv[1]).substr(0, 6)).c_str(), 27, 65, SkPaint());
17 canvas->drawString(("v: " + std::to_string(hsv[2]).substr(0, 6)).c_str(), 27, 85, SkPaint());
/third_party/skia/docs/examples/
DHSVToColor_2.cpp11 SkScalar hsv[3]; in draw() local
12 SkColorToHSV(color, hsv); in draw()
13 hsv[0] = hsv[0] + 90 >= 360 ? hsv[0] - 270 : hsv[0] + 90; in draw()
15 paint.setColor(SkHSVToColor(hsv)); in draw()
DHSVToColor.cpp11 SkScalar hsv[3]; in draw() local
12 SkColorToHSV(color, hsv); in draw()
13 hsv[0] = hsv[0] + 90 >= 360 ? hsv[0] - 270 : hsv[0] + 90; in draw()
15 paint.setColor(SkHSVToColor((x + y) % 256, hsv)); in draw()
DColorToHSV.cpp10 SkScalar hsv[3]; in draw() local
11 SkColorToHSV(source.getColor(x, y), hsv); in draw()
12 hsv[1] = 1 - hsv[1]; in draw()
14 paint.setColor(SkHSVToColor(hsv)); in draw()
DRGBToHSV.cpp12 SkScalar hsv[3];
14 SkRGBToHSV(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c), hsv);
15 canvas->drawString(("h: " + std::to_string(hsv[0]).substr(0, 6)).c_str(), 27, 45, SkPaint());
16 canvas->drawString(("s: " + std::to_string(hsv[1]).substr(0, 6)).c_str(), 27, 65, SkPaint());
17 canvas->drawString(("v: " + std::to_string(hsv[2]).substr(0, 6)).c_str(), 27, 85, SkPaint());
/third_party/flutter/skia/tests/
DHSVRoundTripTest.cpp13 SkScalar hsv[3]; in DEF_TEST() local
18 SkColorToHSV(color, hsv); in DEF_TEST()
19 SkColor result = SkHSVToColor(0xFF, hsv); in DEF_TEST()
25 color, hsv[0], hsv[1], hsv[2], result); in DEF_TEST()
/third_party/skia/tests/
DHSVRoundTripTest.cpp13 SkScalar hsv[3]; in DEF_TEST() local
18 SkColorToHSV(color, hsv); in DEF_TEST()
19 SkColor result = SkHSVToColor(0xFF, hsv); in DEF_TEST()
25 color, hsv[0], hsv[1], hsv[2], result); in DEF_TEST()
/third_party/flutter/skia/gm/
Dmanypaths.cpp23 SkScalar hsv[3]; in gen_color() local
24 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in gen_color()
25 hsv[1] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
26 hsv[2] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
28 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in gen_color()
Dovals.cpp138 SkScalar hsv[3]; in genColor() local
139 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in genColor()
140 hsv[1] = rand->nextRangeF(0.75f, 1.0f); in genColor()
141 hsv[2] = rand->nextRangeF(0.75f, 1.0f); in genColor()
143 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in genColor()
Droundrects.cpp30 SkScalar hsv[3]; in gen_color() local
31 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in gen_color()
32 hsv[1] = rand->nextRangeF(0.75f, 1.0f); in gen_color()
33 hsv[2] = rand->nextRangeF(0.75f, 1.0f); in gen_color()
35 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in gen_color()
/third_party/skia/gm/
Dmanypaths.cpp23 SkScalar hsv[3]; in gen_color() local
24 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in gen_color()
25 hsv[1] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
26 hsv[2] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
28 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in gen_color()
Dovals.cpp138 SkScalar hsv[3]; in genColor() local
139 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in genColor()
140 hsv[1] = rand->nextRangeF(0.75f, 1.0f); in genColor()
141 hsv[2] = rand->nextRangeF(0.75f, 1.0f); in genColor()
143 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in genColor()
Droundrects.cpp30 SkScalar hsv[3]; in gen_color() local
31 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in gen_color()
32 hsv[1] = rand->nextRangeF(0.75f, 1.0f); in gen_color()
33 hsv[2] = rand->nextRangeF(0.75f, 1.0f); in gen_color()
35 return ToolUtils::color_to_565(SkHSVToColor(hsv)); in gen_color()
/third_party/node/deps/npm/node_modules/color-convert/
Dconversions.js18 hsv: {channels: 3, labels: 'hsv'},
97 convert.rgb.hsv = function (rgb) { function
296 convert.hsl.hsv = function (hsl) { function
314 convert.hsv.rgb = function (hsv) { argument
315 var h = hsv[0] / 60;
316 var s = hsv[1] / 100;
317 var v = hsv[2] / 100;
342 convert.hsv.hsl = function (hsv) { argument
343 var h = hsv[0];
344 var s = hsv[1] / 100;
[all …]
/third_party/flutter/skia/include/core/
DSkColor.h155 SK_API void SkRGBToHSV(U8CPU red, U8CPU green, U8CPU blue, SkScalar hsv[3]);
165 static inline void SkColorToHSV(SkColor color, SkScalar hsv[3]) { in SkColorToHSV()
166 SkRGBToHSV(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color), hsv); in SkColorToHSV()
180 SK_API SkColor SkHSVToColor(U8CPU alpha, const SkScalar hsv[3]);
192 static inline SkColor SkHSVToColor(const SkScalar hsv[3]) { in SkHSVToColor()
193 return SkHSVToColor(0xFF, hsv); in SkHSVToColor()
/third_party/skia/include/core/
DSkColor.h157 SK_API void SkRGBToHSV(U8CPU red, U8CPU green, U8CPU blue, SkScalar hsv[3]);
167 static inline void SkColorToHSV(SkColor color, SkScalar hsv[3]) { in SkColorToHSV()
168 SkRGBToHSV(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color), hsv); in SkColorToHSV()
182 SK_API SkColor SkHSVToColor(U8CPU alpha, const SkScalar hsv[3]);
194 static inline SkColor SkHSVToColor(const SkScalar hsv[3]) { in SkHSVToColor()
195 return SkHSVToColor(0xFF, hsv); in SkHSVToColor()
/third_party/python/Lib/test/
Dtest_colorsys.py41 for (rgb, hsv) in values:
42 self.assertTripleEqual(hsv, colorsys.rgb_to_hsv(*rgb))
43 self.assertTripleEqual(rgb, colorsys.hsv_to_rgb(*hsv))
/third_party/flutter/skia/site/user/api/
DSkColor_Reference.md32 … <a href='undocumented#U8CPU'>U8CPU</a> blue, <a href='undocumented#SkScalar'>SkScalar</a> hsv[3]);
34 … <a href='SkColor_Reference#Color'>color</a>, <a href='undocumented#SkScalar'>SkScalar</a> hsv[3]);
36 …ef='SkColor_Reference#Alpha'>alpha</a>, const <a href='undocumented#SkScalar'>SkScalar</a> hsv[3]);
38 …eference#SkHSVToColor'>SkHSVToColor</a>(const <a href='undocumented#SkScalar'>SkScalar</a> hsv[3]);
539 …, <a href='undocumented#U8CPU'>U8CPU</a> blue, <a href='undocumented#SkScalar'>SkScalar</a> hsv[3])
543 <a href='#SkRGBToHSV_hsv'>hsv</a>[0] contains <a href='#Color_HSV_Hue'>HSV_Hue</a>, a value from ze…
544 <a href='#SkRGBToHSV_hsv'>hsv</a>[1] contains <a href='#Color_HSV_Saturation'>HSV_Saturation</a>, a…
545 <a href='#SkRGBToHSV_hsv'>hsv</a>[2] contains <a href='#Color_HSV_Value'>HSV_Value</a>, a value fro…
558 <tr> <td><a name='SkRGBToHSV_hsv'><code><strong>hsv</strong></code></a></td>
577 …> <a href='SkColor_Reference#Color'>color</a>, <a href='undocumented#SkScalar'>SkScalar</a> hsv[3])
[all …]
/third_party/boost/libs/utility/test/
Dstring_view_test1.cpp93 boost::hash<string_view> hsv; in test_hash() local
94 BOOST_TEST(hsv(ref) == hstr(str)); in test_hash()

12