Skip to content

Commit 8529ceb

Browse files
authored
Merge pull request #8472 from IgniteUI/simeonoff/dv-palettes
feat(themes): add enhanced color palettes for DV components
2 parents fd64858 + 3bdd848 commit 8529ceb

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed

projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -477,17 +477,34 @@
477477
}
478478

479479
@function igx-generate-series-colors($palette) {
480+
$color-blind: if(global-variable-exists('_igx-enhanced-accessibility'), $_igx-enhanced-accessibility, false);
481+
482+
@if $color-blind {
483+
@return (
484+
rgb(86, 180, 233),
485+
rgb(0, 158, 115),
486+
rgb(240, 228, 68),
487+
rgb(213, 94, 0),
488+
rgb(214, 0, 254),
489+
rgb(0, 73, 159),
490+
rgb(230, 159, 0),
491+
rgb(0, 0, 0),
492+
rgb(132, 240, 223),
493+
rgb(115, 86, 86),
494+
);
495+
}
496+
480497
@return (
481-
igx-color($palette, 'primary'),
482-
igx-color($palette, 'secondary'),
483-
rgb(249, 98, 50),
484-
rgb(60, 189, 201),
485-
rgb(220, 63, 118),
486-
rgb(255, 152, 0),
487-
rgb(78, 98, 207),
488-
rgb(84, 194, 90),
489-
rgb(121, 85, 72),
490-
rgb(154, 154, 154)
498+
rgb(157, 231, 114),
499+
rgb(139, 91, 177),
500+
rgb(109, 177, 255),
501+
rgb(154, 242, 228),
502+
rgb(238, 88, 121),
503+
rgb(115, 86, 86),
504+
rgb(247, 210, 98),
505+
rgb(168, 168, 183),
506+
rgb(224, 81, 169),
507+
rgb(248, 161, 95),
491508
);
492509
}
493510

projects/igniteui-angular/src/lib/core/styles/themes/_core.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,24 @@
8888

8989
/// @param {boolean} $print-layout [true] - Activates the printing styles of the components.
9090
/// @param {string} $direction [ltr] - Sets the layout direction. Can be 'ltr' or 'rtl'.
91+
/// @param {boolean} $enhanced-accesibility [false] - Switches component colors and other properties to more accessible values.
9192
/// @param {color} $foreground-color [0, 0, 0, .87] - Sets the value of the global $igx-foreground-color used in all typography styles.
9293
/// @requires {mixin} igx-typography
9394
/// @requires {mixin} igx-vhelper
9495
/// @requires {mixin} igx-print-layout
9596
@mixin igx-core(
9697
$print-layout: true,
9798
$direction: ltr,
99+
$enhanced-accessibility: false
98100
) {
99101
@if $direction != ltr and $direction != rtl {
100102
$direction: ltr !global;
101103
} @else {
102104
$direction: $direction !global;
103105
}
104106

107+
$_igx-enhanced-accessibility: $enhanced-accessibility !global;
108+
105109
@include igx-typography();
106110
@include igx-vhelper();
107111

0 commit comments

Comments
 (0)