Skip to content

Commit 0f12eec

Browse files
committed
Some updates
1 parent 6acdf9b commit 0f12eec

File tree

4 files changed

+138
-91
lines changed

4 files changed

+138
-91
lines changed
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
export interface HslColor {
2-
h: number;
3-
s: number;
4-
l: number;
5-
}
1+
/**
2+
* Interface for HSL color
3+
*/
4+
export interface HslColor {
5+
/**
6+
* hue
7+
*/
8+
h: number;
9+
s: number;
10+
l: number;
11+
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// Clamps a value between an upper and lower bound.
2-
// We use ternary operators because it makes the minified code
3-
// 2 times shorter then `Math.min(Math.max(a,b),c)`
4-
export const clamp = (num: number, min = 0, max = 1): number => {
5-
return num > max ? max : num < min ? min : num;
6-
};
1+
/**
2+
* Clamps a value between an upper and lower bound.
3+
*/
4+
export const clamp = (num: number, min = 0, max = 1): number =>
5+
// We use ternary operators because it makes the minified code
6+
// 2 times shorter, then `Math.min(Math.max(a,b),c)`
7+
num > max ? max : num < min ? min : num;
Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,60 @@
1-
import {HsvaColor} from '../interfaces/hsva-color.interface';
2-
import {HsvColor} from '../interfaces/hsv-color.interface';
3-
import {HslaColor} from '../interfaces/hsla-color.interface';
4-
import {HslColor} from '../interfaces/hsl-color.interface';
5-
import {RgbaColor} from '../interfaces/rgba-color.interface';
6-
import {RgbColor} from '../interfaces/rgb-color.interface';
7-
8-
9-
export const defaultHsvaColor: HsvaColor = {h: 0, s: 0, v: 0, a: 1};
10-
export const defaultHsvColor: HsvColor = {h: 0, s: 0, v: 0};
11-
export const defaultHsvaStringColor = 'hsv(0, 0%, 0%, 100%)';
12-
export const defaultHsvStringColor = 'hsv(0, 0%, 0%)';
13-
export const defaultHslaColor: HslaColor = {h: 0, s: 0, l: 0, a: 1};
14-
export const defaultHslColor: HslColor = {h: 0, s: 0, l: 0};
15-
export const defaultHslaStringColor = 'hsl(0, 0%, 0%, 100%)';
16-
export const defaultHslStringColor = 'hsl(0, 0%, 0%)';
17-
export const defaultRgbaColor: RgbaColor = {r: 0, g: 0, b: 0, a: 1};
18-
export const defaultRgbColor: RgbColor = {r: 0, g: 0, b: 0};
19-
export const defaultRgbaStringColor = 'rgba(0, 0, 0, 1)';
20-
export const defaultRgbStringColor = 'rgb(0, 0, 0)';
21-
export const defaultHexStringColor = '#000';
1+
import {HsvaColor} from '../interfaces/hsva-color.interface';
2+
import {HsvColor} from '../interfaces/hsv-color.interface';
3+
import {HslaColor} from '../interfaces/hsla-color.interface';
4+
import {HslColor} from '../interfaces/hsl-color.interface';
5+
import {RgbaColor} from '../interfaces/rgba-color.interface';
6+
import {RgbColor} from '../interfaces/rgb-color.interface';
7+
8+
9+
/**
10+
* Standard (black) color in HSVA format
11+
*/
12+
export const defaultHsvaColor: HsvaColor = {h: 0, s: 0, v: 0, a: 1};
13+
/**
14+
* Standard (black) color in HSV format
15+
*/
16+
export const defaultHsvColor: HsvColor = {h: 0, s: 0, v: 0};
17+
/**
18+
* Standard (black) color in HSVA string format
19+
*/
20+
export const defaultHsvaStringColor = 'hsv(0, 0%, 0%, 100%)';
21+
/**
22+
* Standard (black) color in HSV string format
23+
*/
24+
export const defaultHsvStringColor = 'hsv(0, 0%, 0%)';
25+
/**
26+
* Standard (black) color in HSLA format
27+
*/
28+
export const defaultHslaColor: HslaColor = {h: 0, s: 0, l: 0, a: 1};
29+
/**
30+
* Standard (black) color in HSL format
31+
*/
32+
export const defaultHslColor: HslColor = {h: 0, s: 0, l: 0};
33+
/**
34+
* Standard (black) color in HSLA string format
35+
*/
36+
export const defaultHslaStringColor = 'hsl(0, 0%, 0%, 100%)';
37+
/**
38+
* Standard (black) color in HSL string format
39+
*/
40+
export const defaultHslStringColor = 'hsl(0, 0%, 0%)';
41+
/**
42+
* Standard (black) color in RGBA format
43+
*/
44+
export const defaultRgbaColor: RgbaColor = {r: 0, g: 0, b: 0, a: 1};
45+
/**
46+
* Standard (black) color in RGB format
47+
*/
48+
export const defaultRgbColor: RgbColor = {r: 0, g: 0, b: 0};
49+
/**
50+
* Standard (black) color in RGBA string format
51+
*/
52+
export const defaultRgbaStringColor = 'rgba(0, 0, 0, 1)';
53+
/**
54+
* Standard (black) color in RGB string format
55+
*/
56+
export const defaultRgbStringColor = 'rgb(0, 0, 0)';
57+
/**
58+
* Standard (black) color in HEX string format
59+
*/
60+
export const defaultHexStringColor = '#000';

src/app/manifest.webmanifest

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,60 @@
1-
{
2-
"name": "AngularColorful",
3-
"short_name": "Colorful",
4-
"theme_color": "#1976d2",
5-
"background_color": "#fafafa",
6-
"display": "standalone",
7-
"scope": "./",
8-
"start_url": "./",
9-
"icons": [
10-
{
11-
"src": "src/assets/icons/icon-72x72.png",
12-
"sizes": "72x72",
13-
"type": "image/png",
14-
"purpose": "maskable any"
15-
},
16-
{
17-
"src": "src/assets/icons/icon-96x96.png",
18-
"sizes": "96x96",
19-
"type": "image/png",
20-
"purpose": "maskable any"
21-
},
22-
{
23-
"src": "src/assets/icons/icon-128x128.png",
24-
"sizes": "128x128",
25-
"type": "image/png",
26-
"purpose": "maskable any"
27-
},
28-
{
29-
"src": "src/assets/icons/icon-144x144.png",
30-
"sizes": "144x144",
31-
"type": "image/png",
32-
"purpose": "maskable any"
33-
},
34-
{
35-
"src": "src/assets/icons/icon-152x152.png",
36-
"sizes": "152x152",
37-
"type": "image/png",
38-
"purpose": "maskable any"
39-
},
40-
{
41-
"src": "src/assets/icons/icon-192x192.png",
42-
"sizes": "192x192",
43-
"type": "image/png",
44-
"purpose": "maskable any"
45-
},
46-
{
47-
"src": "src/assets/icons/icon-384x384.png",
48-
"sizes": "384x384",
49-
"type": "image/png",
50-
"purpose": "maskable any"
51-
},
52-
{
53-
"src": "src/assets/icons/icon-512x512.png",
54-
"sizes": "512x512",
55-
"type": "image/png",
56-
"purpose": "maskable any"
57-
}
58-
]
59-
}
1+
{
2+
"name": "AngularColorful",
3+
"short_name": "Colorful",
4+
"homepage": ".",
5+
"theme_color": "#1976d2",
6+
"background_color": "#fafafa",
7+
"display": "standalone",
8+
"scope": "./",
9+
"start_url": "./",
10+
"icons": [
11+
{
12+
"src": "src/assets/icons/icon-72x72.png",
13+
"sizes": "72x72",
14+
"type": "image/png",
15+
"purpose": "maskable any"
16+
},
17+
{
18+
"src": "src/assets/icons/icon-96x96.png",
19+
"sizes": "96x96",
20+
"type": "image/png",
21+
"purpose": "maskable any"
22+
},
23+
{
24+
"src": "src/assets/icons/icon-128x128.png",
25+
"sizes": "128x128",
26+
"type": "image/png",
27+
"purpose": "maskable any"
28+
},
29+
{
30+
"src": "src/assets/icons/icon-144x144.png",
31+
"sizes": "144x144",
32+
"type": "image/png",
33+
"purpose": "maskable any"
34+
},
35+
{
36+
"src": "src/assets/icons/icon-152x152.png",
37+
"sizes": "152x152",
38+
"type": "image/png",
39+
"purpose": "maskable any"
40+
},
41+
{
42+
"src": "src/assets/icons/icon-192x192.png",
43+
"sizes": "192x192",
44+
"type": "image/png",
45+
"purpose": "maskable any"
46+
},
47+
{
48+
"src": "src/assets/icons/icon-384x384.png",
49+
"sizes": "384x384",
50+
"type": "image/png",
51+
"purpose": "maskable any"
52+
},
53+
{
54+
"src": "src/assets/icons/icon-512x512.png",
55+
"sizes": "512x512",
56+
"type": "image/png",
57+
"purpose": "maskable any"
58+
}
59+
]
60+
}

0 commit comments

Comments
 (0)