thomasp85 / farver

@@ -14,8 +14,9 @@
Loading
14 14
#' assumed 1. If `FALSE` any alpha channel is ignored.
15 15
#' @param to The output colour space. Allowed values are: `"cmy"`, 
16 16
#' `"cmyk"`, `"hsl"`, `"hsb"`, `"hsv"`, `"lab"` (CIE L*ab), `"hunterlab"` 
17 -
#' (Hunter Lab), `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, `"rgb"` (sRGB), 
18 -
#' `"xyz"`, `"yxy"` (CIE xyY), or `"hcl"` (CIE Lch(uv) / polarLuv) 
17 +
#' (Hunter Lab), `"oklab"`, `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, 
18 +
#' `"rgb"` (sRGB), `"xyz"`, `"yxy"` (CIE xyY), `"hcl"` (CIE Lch(uv) / polarLuv),
19 +
#' or `"oklch"` (Polar form of oklab)
19 20
#' @param white The white reference of the output colour space. Will only have 
20 21
#' an effect for relative colour spaces such as Lab and luv. Any value accepted 
21 22
#' by [as_white_ref()] allowed.

@@ -202,6 +202,32 @@
Loading
202 202
	  virtual void Cap();
203 203
	};
204 204
	
205 +
	struct OkLab : public IColorSpace {
206 +
	  double l, a, b;
207 +
	  
208 +
	  OkLab();
209 +
	  OkLab(double l, double a, double b);
210 +
	  OkLab(int l, int a, int b);
211 +
	  
212 +
	  virtual void Initialize(Rgb *color);
213 +
	  virtual void ToRgb(Rgb *color);
214 +
	  virtual void Copy(IColorSpace *color);
215 +
	  virtual void Cap();
216 +
	};
217 +
	
218 +
	struct OkLch : public IColorSpace {
219 +
	  double l, c, h;
220 +
	  
221 +
	  OkLch();
222 +
	  OkLch(double l, double c, double h);
223 +
	  OkLch(int l, int c, int h);
224 +
	  
225 +
	  virtual void Initialize(Rgb *color);
226 +
	  virtual void ToRgb(Rgb *color);
227 +
	  virtual void Copy(IColorSpace *color);
228 +
	  virtual void Cap();
229 +
	};
230 +
	
205 231
}
206 232
207 233
#endif // COLOR_SPACE_H

@@ -243,6 +243,36 @@
Loading
243 243
  }
244 244
}
245 245
246 +
template <>
247 +
inline void modify_channel<ColorSpace::OkLab>(ColorSpace::OkLab& color, double value, int channel, int op){
248 +
  switch (channel) {
249 +
  case 1: 
250 +
    color.l = mod_val(color.l, value, op);
251 +
    break;
252 +
  case 2:
253 +
    color.a = mod_val(color.a, value, op);
254 +
    break;
255 +
  case 3:
256 +
    color.b = mod_val(color.b, value, op);
257 +
    break;
258 +
  }
259 +
}
260 +
261 +
template <>
262 +
inline void modify_channel<ColorSpace::OkLch>(ColorSpace::OkLch& color, double value, int channel, int op){
263 +
  switch (channel) {
264 +
  case 1: 
265 +
    color.l = mod_val(color.l, value, op);
266 +
    break;
267 +
  case 2:
268 +
    color.c = mod_val(color.c, value, op);
269 +
    break;
270 +
  case 3:
271 +
    color.h = mod_val(color.h, value, op);
272 +
    break;
273 +
  }
274 +
}
275 +
246 276
247 277
template <typename Space>
248 278
inline double grab_channel(Space&,int channel);
@@ -378,4 +408,24 @@
Loading
378 408
  return 0.0;
379 409
}
380 410
411 +
template <>
412 +
inline double grab_channel<ColorSpace::OkLab>(ColorSpace::OkLab& color, int channel){
413 +
  switch (channel) {
414 +
  case 1: return color.l;
415 +
  case 2: return color.a;
416 +
  case 3: return color.b;
417 +
  }
418 +
  return 0.0;
419 +
}
420 +
421 +
template <>
422 +
inline double grab_channel<ColorSpace::OkLch>(ColorSpace::OkLch& color, int channel){
423 +
  switch (channel) {
424 +
  case 1: return color.l;
425 +
  case 2: return color.c;
426 +
  case 3: return color.h;
427 +
  }
428 +
  return 0.0;
429 +
}
430 +
381 431
#endif

@@ -11,8 +11,9 @@
Loading
11 11
#' of rows in `colour`. If `NULL` or a single `NA` it will be ignored.
12 12
#' @param from The input colour space. Allowed values are: `"cmy"`, 
13 13
#' `"cmyk"`, `"hsl"`, `"hsb"`, `"hsv"`, `"lab"` (CIE L*ab), `"hunterlab"` 
14 -
#' (Hunter Lab), `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, `"rgb"` (sRGB), 
15 -
#' `"xyz"`, `"yxy"` (CIE xyY), or `"hcl"` (CIE Lch(uv) / polarLuv)
14 +
#' (Hunter Lab), `"oklab"`, `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, 
15 +
#' `"rgb"` (sRGB), `"xyz"`, `"yxy"` (CIE xyY), `"hcl"` (CIE Lch(uv) / polarLuv),
16 +
#' or `"oklch"` (Polar form of oklab)
16 17
#' @param white The white reference of the input colour space. Will only have an 
17 18
#' effect for relative colour spaces such as Lab and luv. Any value accepted by 
18 19
#' [as_white_ref()] allowed.

@@ -563,5 +563,99 @@
Loading
563 563
	  
564 564
	  LuvConverter::ToColor(color, &luv);
565 565
	}
566 +
	
567 +
	// Using values reported at https://bottosson.github.io/posts/oklab/#converting-from-linear-srgb-to-oklab
568 +
	// instead of going through xyz. This ensures any whitepoint is ignored
569 +
	void OkLabConverter::ToColorSpace(Rgb *color, OkLab *item) {
570 +
	  if (!color->valid) {
571 +
	    item->valid = false;
572 +
	    return;
573 +
	  }
574 +
	  item->valid = true;
575 +
	  double r = color->r / 255.0;
576 +
	  double g = color->g / 255.0;
577 +
	  double b = color->b / 255.0;
578 +
	  
579 +
	  r = ((r > 0.04045) ? std::pow((r + 0.055) / 1.055, 2.4) : (r / 12.92));
580 +
	  g = ((g > 0.04045) ? std::pow((g + 0.055) / 1.055, 2.4) : (g / 12.92));
581 +
	  b = ((b > 0.04045) ? std::pow((b + 0.055) / 1.055, 2.4) : (b / 12.92));
582 +
	  
583 +
	  double l = 0.4121656120 * r + 0.5362752080 * g + 0.0514575653 * b;
584 +
	  double m = 0.2118591070 * r + 0.6807189584 * g + 0.1074065790 * b;
585 +
	  double s = 0.0883097947 * r + 0.2818474174 * g + 0.6302613616 * b;
586 +
	  
587 +
	  
588 +
	  l = std::cbrt(l);
589 +
	  m = std::cbrt(m);
590 +
	  s = std::cbrt(s);
591 +
	  
592 +
	  item->l = 0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s;
593 +
	  item->a = 1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s;
594 +
	  item->b = 0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s;
595 +
	}
596 +
	void OkLabConverter::ToColor(Rgb *color, OkLab *item) {
597 +
	  if (!item->valid) {
598 +
	    color->valid = false;
599 +
	    return;
600 +
	  }
601 +
	  color->valid = true;
602 +
	  double l = item->l + 0.3963377774 * item->a + 0.2158037573 * item->b;
603 +
	  double m = item->l - 0.1055613458 * item->a - 0.0638541728 * item->b;
604 +
	  double s = item->l - 0.0894841775 * item->a - 1.2914855480 * item->b;
605 +
	  
606 +
	  l = l * l * l;
607 +
	  m = m * m * m;
608 +
	  s = s * s * s;
609 +
	  
610 +
	  double r =  4.0767245293 * l - 3.3072168827 * m + 0.2307590544 * s;
611 +
	  double g = -1.2681437731 * l + 2.6093323231 * m - 0.3411344290 * s;
612 +
	  double b = -0.0041119885 * l - 0.7034763098 * m + 1.7068625689 * s;
613 +
	  
614 +
	  color->r = ((r > 0.0031308) ? (1.055*std::pow(r, 1 / 2.4) - 0.055) : (12.92*r)) * 255.0;
615 +
	  color->g = ((g > 0.0031308) ? (1.055*std::pow(g, 1 / 2.4) - 0.055) : (12.92*g)) * 255.0;
616 +
	  color->b = ((b > 0.0031308) ? (1.055*std::pow(b, 1 / 2.4) - 0.055) : (12.92*b)) * 255.0;
617 +
	}
618 +
	
619 +
	void OkLchConverter::ToColorSpace(Rgb *color, OkLch *item) {
620 +
	  if (!color->valid) {
621 +
	    item->valid = false;
622 +
	    return;
623 +
	  }
624 +
	  item->valid = true;
625 +
	  OkLab lab;
626 +
	  
627 +
	  OkLabConverter::ToColorSpace(color, &lab);
628 +
	  double l = lab.l;
629 +
	  double c = std::sqrt(lab.a*lab.a + lab.b*lab.b);
630 +
	  double h = std::atan2(lab.b, lab.a);
631 +
	  
632 +
	  h = h / M_PI * 180;
633 +
	  if (h < 0) {
634 +
	    h += 360;
635 +
	  }
636 +
	  else if (h >= 360) {
637 +
	    h -= 360;
638 +
	  }
639 +
	  
640 +
	  item->l = l;
641 +
	  item->c = c;
642 +
	  item->h = h;
643 +
	}
644 +
	void OkLchConverter::ToColor(Rgb *color, OkLch *item) {
645 +
	  if (!item->valid) {
646 +
	    color->valid = false;
647 +
	    return;
648 +
	  }
649 +
	  color->valid = true;
650 +
	  OkLab lab;
651 +
	  
652 +
	  item->h = item->h * M_PI / 180;
653 +
	  
654 +
	  lab.l = item->l;
655 +
	  lab.a = std::cos(item->h)*item->c;
656 +
	  lab.b = std::sin(item->h)*item->c;
657 +
	  
658 +
	  OkLabConverter::ToColor(color, &lab);
659 +
	}
566 660
}
567 661

@@ -11,8 +11,9 @@
Loading
11 11
#' @param value The value to modify with
12 12
#' @param space The colour space the channel pertains to. Allowed values are: 
13 13
#' `"cmy"`, `"cmyk"`, `"hsl"`, `"hsb"`, `"hsv"`, `"lab"` (CIE L*ab), `"hunterlab"` 
14 -
#' (Hunter Lab), `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, `"rgb"` (sRGB), 
15 -
#' `"xyz"`, `"yxy"` (CIE xyY), or `"hcl"` (CIE Lch(uv) / polarLuv)
14 +
#' (Hunter Lab), `"oklab"` , `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, 
15 +
#' `"rgb"` (sRGB), `"xyz"`, `"yxy"` (CIE xyY), `"hcl"` (CIE Lch(uv) / polarLuv),
16 +
#' or `"oklch"` (Polar form of oklab)
16 17
#' @param white The white reference of the channel colour space. Will only have 
17 18
#' an effect for relative colour spaces such as Lab and luv. Any value accepted 
18 19
#' by [as_white_ref()] allowed.

@@ -353,5 +353,55 @@
Loading
353 353
    c = c < 0.0 ? 0.0 : c;
354 354
    l = l < 0.0 ? 0.0 : (l > 100.0 ? 100.0 : l);
355 355
  }
356 +
357 +
  OkLab::OkLab() {}
358 +
  OkLab::OkLab(double l, double a, double b) : l(l), a(a), b(b) {
359 +
    valid = R_finite(l) && R_finite(a) && R_finite(b);
360 +
  }
361 +
  OkLab::OkLab(int l, int a, int b) : l(l), a(a), b(b) {
362 +
    valid = !(l == R_NaInt || a == R_NaInt || b == R_NaInt);
363 +
  }
364 +
  void OkLab::Initialize(Rgb *color) {
365 +
    OkLabConverter::ToColorSpace(color, this);
366 +
  }
367 +
  void OkLab::ToRgb(Rgb *color) {
368 +
    OkLabConverter::ToColor(color, this);
369 +
  }
370 +
  void OkLab::Copy(IColorSpace *color) {
371 +
    OkLab *lab = static_cast<OkLab*>(color);
372 +
    lab->l = l;
373 +
    lab->a = a;
374 +
    lab->b = b;
375 +
    lab->valid = valid;
376 +
  }
377 +
  void OkLab::Cap() {
378 +
    if (!valid) return;
379 +
    l = l < 0.0 ? 0.0 : (l > 1.0 ? 1.0 : l);
380 +
  }
381 +
382 +
OkLch::OkLch() {}
383 +
OkLch::OkLch(double l, double c, double h) : l(l), c(c), h(h) {
384 +
  valid = R_finite(l) && R_finite(c) && R_finite(h);
385 +
}
386 +
OkLch::OkLch(int l, int c, int h) : l(l), c(c), h(h) {
387 +
  valid = !(l == R_NaInt || c == R_NaInt || h == R_NaInt);
388 +
}
389 +
void OkLch::Initialize(Rgb *color) {
390 +
  OkLchConverter::ToColorSpace(color, this);
391 +
}
392 +
void OkLch::ToRgb(Rgb *color) {
393 +
  OkLchConverter::ToColor(color, this);
394 +
}
395 +
void OkLch::Copy(IColorSpace *color) {
396 +
  OkLch *lch = static_cast<OkLch*>(color);
397 +
  lch->l = l;
398 +
  lch->c = c;
399 +
  lch->h = h;
400 +
  lch->valid = valid;
401 +
}
402 +
void OkLch::Cap() {
403 +
  if (!valid) return;
404 +
  l = l < 0.0 ? 0.0 : (l > 1.0 ? 1.0 : l);
405 +
}
356 406
}
357 407

@@ -314,6 +314,8 @@
Loading
314 314
    case XYZ: return encode_impl<ColorSpace::Xyz>(colour, alpha, white);
315 315
    case YXY: return encode_impl<ColorSpace::Yxy>(colour, alpha, white);
316 316
    case HCL: return encode_impl<ColorSpace::Hcl>(colour, alpha, white);
317 +
    case OKLAB: return encode_impl<ColorSpace::OkLab>(colour, alpha, white);
318 +
    case OKLCH: return encode_impl<ColorSpace::OkLch>(colour, alpha, white);
317 319
  }
318 320
  
319 321
  // never happens
@@ -536,6 +538,8 @@
Loading
536 538
    case XYZ: return decode_impl<ColorSpace::Xyz>(codes, alpha, white, na);
537 539
    case YXY: return decode_impl<ColorSpace::Yxy>(codes, alpha, white, na);
538 540
    case HCL: return decode_impl<ColorSpace::Hcl>(codes, alpha, white, na);
541 +
    case OKLAB: return decode_impl<ColorSpace::OkLab>(codes, alpha, white, na);
542 +
    case OKLCH: return decode_impl<ColorSpace::OkLch>(codes, alpha, white, na);
539 543
  }
540 544
  
541 545
  // never happens
@@ -858,6 +862,8 @@
Loading
858 862
    case XYZ: return encode_channel_impl<ColorSpace::Xyz>(codes, channel, value, op, white, na);
859 863
    case YXY: return encode_channel_impl<ColorSpace::Yxy>(codes, channel, value, op, white, na);
860 864
    case HCL: return encode_channel_impl<ColorSpace::Hcl>(codes, channel, value, op, white, na);
865 +
    case OKLAB: return encode_channel_impl<ColorSpace::OkLab>(codes, channel, value, op, white, na);
866 +
    case OKLCH: return encode_channel_impl<ColorSpace::OkLch>(codes, channel, value, op, white, na);
861 867
  }
862 868
  
863 869
  // never happens
@@ -1058,6 +1064,8 @@
Loading
1058 1064
  case XYZ: return decode_channel_impl<ColorSpace::Xyz>(codes, channel, white, na);
1059 1065
  case YXY: return decode_channel_impl<ColorSpace::Yxy>(codes, channel, white, na);
1060 1066
  case HCL: return decode_channel_impl<ColorSpace::Hcl>(codes, channel, white, na);
1067 +
  case OKLAB: return decode_channel_impl<ColorSpace::OkLab>(codes, channel, white, na);
1068 +
  case OKLCH: return decode_channel_impl<ColorSpace::OkLch>(codes, channel, white, na);
1061 1069
  }
1062 1070
  
1063 1071
  // never happens

@@ -22,6 +22,8 @@
Loading
22 22
#define XYZ 11
23 23
#define YXY 12
24 24
#define HCL 13
25 +
#define OKLAB 14
26 +
#define OKLCH 15
25 27
26 28
#define EUCLIDEAN 1
27 29
#define CIE1976 2
@@ -302,4 +304,30 @@
Loading
302 304
  }
303 305
}
304 306
307 +
template <>
308 +
inline void grab<ColorSpace::OkLab>(const ColorSpace::OkLab& color, double* x1, double* x2, double* x3, double* x4){
309 +
  if (color.valid) {
310 +
    *x1 = color.l ;
311 +
    *x2 = color.a ;
312 +
    *x3 = color.b ;
313 +
  } else {
314 +
    *x1 = R_NaReal ;
315 +
    *x2 = R_NaReal ;
316 +
    *x3 = R_NaReal ;
317 +
  }
318 +
}
319 +
320 +
template <>
321 +
inline void grab<ColorSpace::OkLch>(const ColorSpace::OkLch& color, double* x1, double* x2, double* x3, double* x4){
322 +
  if (color.valid) {
323 +
    *x1 = color.l ;
324 +
    *x2 = color.c ;
325 +
    *x3 = color.h ;
326 +
  } else {
327 +
    *x1 = R_NaReal ;
328 +
    *x2 = R_NaReal ;
329 +
    *x3 = R_NaReal ;
330 +
  }
331 +
}
332 +
305 333
#endif

@@ -1,17 +1,19 @@
Loading
1 1
colourspaces <- c(
2 -
  "cmy",       # 0
3 -
  "cmyk",      # 1
4 -
  "hsl",       # 2
5 -
  "hsb",       # 3
6 -
  "hsv",       # 4
7 -
  "lab",       # 5
8 -
  "hunterlab", # 6
9 -
  "lch",       # 7
10 -
  "luv",       # 8
11 -
  "rgb",       # 9
12 -
  "xyz",       # 10
13 -
  "yxy",       # 11
14 -
  "hcl"        # 11
2 +
  "cmy",       # 1
3 +
  "cmyk",      # 2
4 +
  "hsl",       # 3
5 +
  "hsb",       # 4
6 +
  "hsv",       # 5
7 +
  "lab",       # 6
8 +
  "hunterlab", # 7
9 +
  "lch",       # 8
10 +
  "luv",       # 9
11 +
  "rgb",       # 10
12 +
  "xyz",       # 11
13 +
  "yxy",       # 12
14 +
  "hcl",       # 13
15 +
  "oklab",     # 14
16 +
  "oklch"      # 15
15 17
)
16 18
colour_dims <- list(
17 19
  cmy = c('c', 'm', 'y'),
@@ -26,7 +28,9 @@
Loading
26 28
  rgb = c('r', 'g', 'b'),
27 29
  xyz = c('x', 'y', 'z'),
28 30
  yxy = c('y1', 'x', 'y2'),
29 -
  hcl = c('h', 'c', 'l')
31 +
  hcl = c('h', 'c', 'l'),
32 +
  oklab = c('l', 'a', 'b'),
33 +
  oklch = c('l', 'c', 'h')
30 34
)
31 35
colour_channel_index <- list(
32 36
  cmy = c('c' = 1L, 'm' = 2L, 'y' = 3L),
@@ -41,7 +45,9 @@
Loading
41 45
  rgb = c('r' = 1L, 'g' = 2L, 'b' = 3L),
42 46
  xyz = c('x' = 1L, 'y' = 2L, 'z' = 3L),
43 47
  yxy = c('y1' = 1L, 'x' = 2L, 'y2' = 3L),
44 -
  hcl = c('h' = 1L, 'c' = 2L, 'l' = 3L)
48 +
  hcl = c('h' = 1L, 'c' = 2L, 'l' = 3L),
49 +
  oklab = c('l' = 1L, 'a' = 2L, 'b' = 3L),
50 +
  oklch = c('l' = 1L, 'c' = 2L, 'h' = 3L)
45 51
)
46 52
distances <- c(
47 53
  "euclidean",

@@ -87,6 +87,8 @@
Loading
87 87
    case XYZ: return convert_dispatch_impl<From, ColorSpace::Xyz>(colour, white_from, white_to);
88 88
    case YXY: return convert_dispatch_impl<From, ColorSpace::Yxy>(colour, white_from, white_to);
89 89
    case HCL: return convert_dispatch_impl<From, ColorSpace::Hcl>(colour, white_from, white_to);
90 +
    case OKLAB: return convert_dispatch_impl<From, ColorSpace::OkLab>(colour, white_from, white_to);
91 +
    case OKLCH: return convert_dispatch_impl<From, ColorSpace::OkLch>(colour, white_from, white_to);
90 92
  }
91 93
  
92 94
  // never happens
@@ -109,6 +111,8 @@
Loading
109 111
    case XYZ: return convert_dispatch_to<ColorSpace::Xyz>(colour, to, white_from, white_to);
110 112
    case YXY: return convert_dispatch_to<ColorSpace::Yxy>(colour, to, white_from, white_to);
111 113
    case HCL: return convert_dispatch_to<ColorSpace::Hcl>(colour, to, white_from, white_to);
114 +
    case OKLAB: return convert_dispatch_to<ColorSpace::OkLab>(colour, to, white_from, white_to);
115 +
    case OKLCH: return convert_dispatch_to<ColorSpace::OkLch>(colour, to, white_from, white_to);
112 116
  }
113 117
  
114 118
  // never happens so we just return the input to quiet the compiler
@@ -229,6 +233,8 @@
Loading
229 233
    case XYZ: return compare_dispatch_impl<From, ColorSpace::Xyz>(from, to, dist, sym, white_from, white_to);
230 234
    case YXY: return compare_dispatch_impl<From, ColorSpace::Yxy>(from, to, dist, sym, white_from, white_to);
231 235
    case HCL: return compare_dispatch_impl<From, ColorSpace::Hcl>(from, to, dist, sym, white_from, white_to);
236 +
    case OKLAB: return compare_dispatch_impl<From, ColorSpace::OkLab>(from, to, dist, sym, white_from, white_to);
237 +
    case OKLCH: return compare_dispatch_impl<From, ColorSpace::OkLch>(from, to, dist, sym, white_from, white_to);
232 238
  }
233 239
  
234 240
  // never happens
@@ -249,6 +255,8 @@
Loading
249 255
    case RGB: return compare_dispatch_to<ColorSpace::Rgb>(from, to, to_space, dist, sym, white_from, white_to);
250 256
    case XYZ: return compare_dispatch_to<ColorSpace::Xyz>(from, to, to_space, dist, sym, white_from, white_to);
251 257
    case YXY: return compare_dispatch_to<ColorSpace::Hcl>(from, to, to_space, dist, sym, white_from, white_to);
258 +
    case OKLAB: return compare_dispatch_to<ColorSpace::OkLab>(from, to, to_space, dist, sym, white_from, white_to);
259 +
    case OKLCH: return compare_dispatch_to<ColorSpace::OkLch>(from, to, to_space, dist, sym, white_from, white_to);
252 260
  }
253 261
  
254 262
  // never happens so we just return the input to quiet the compiler

@@ -23,8 +23,9 @@
Loading
23 23
#' 
24 24
#' @param from,to The input and output colour space. Allowed values are: `"cmy"`, 
25 25
#' `"cmyk"`, `"hsl"`, `"hsb"`, `"hsv"`, `"lab"` (CIE L*ab), `"hunterlab"` 
26 -
#' (Hunter Lab), `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, `"rgb"` (sRGB), 
27 -
#' `"xyz"`, `"yxy"` (CIE xyY), or `"hcl"` (CIE Lch(uv) / polarLuv)
26 +
#' (Hunter Lab), `"oklab"`, `"lch"` (CIE Lch(ab) / polarLAB), `"luv"`, 
27 +
#' `"rgb"` (sRGB), `"xyz"`, `"yxy"` (CIE xyY), `"hcl"` (CIE Lch(uv) / polarLuv),
28 +
#' or `"oklch"` (Polar form of oklab)
28 29
#' 
29 30
#' @param white_from,white_to The white reference of the from and to colour 
30 31
#' space. Will only have an effect for relative colour spaces such as Lab and 
Files Coverage
R 58.26%
src 54.58%
Project Totals (16 files) 54.76%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading