File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
projects/common/src/color Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export class ColorPalette {
1313 }
1414
1515 public getColorCombinations ( count : number ) : ColorCombination [ ] {
16- return this . forNColors ( count ) . map ( color => ( { background : color , foreground : this . getContrast ( color ) } ) ) ;
16+ return this . forNColors ( count ) . map ( color => ( { background : color , foreground : this . getContrast ( color ) } ) ) ;
1717 }
1818
1919 public getColorCombinationForId ( colorCount : number , id : string ) : ColorCombination {
@@ -25,11 +25,11 @@ export class ColorPalette {
2525 const rgbColor = rgb ( rgbColorString ) ;
2626
2727 // Get YIQ ratio
28- const yiq = ( ( rgbColor . r * 299 ) + ( rgbColor . g * 587 ) + ( rgbColor . b * 114 ) ) / 1000 ;
28+ const yiq = ( rgbColor . r * 299 + rgbColor . g * 587 + rgbColor . b * 114 ) / 1000 ;
2929
3030 // Check contrast
31- return ( yiq >= 128 ) ? Color . Gray9 : Color . White ;
32- } ;
31+ return yiq >= 128 ? Color . Gray9 : Color . White ;
32+ }
3333
3434 public forNColors ( count : number ) : string [ ] {
3535 if ( count === this . basisColors . length ) {
Original file line number Diff line number Diff line change @@ -76,4 +76,4 @@ export const getHexColorForString = (id: string): string => {
7676 }
7777
7878 return rgb ;
79- }
79+ } ;
You can’t perform that action at this time.
0 commit comments