Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
coloration
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
typescript
coloration
Commits
93dba3fa
Commit
93dba3fa
authored
May 17, 2020
by
Zéfling
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix demo for Blink Browsers
parent
ce8dfa4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
114 deletions
+119
-114
src/app/app.component.html
src/app/app.component.html
+117
-112
src/app/app.component.scss
src/app/app.component.scss
+2
-2
No files found.
src/app/app.component.html
View file @
93dba3fa
...
...
@@ -5,131 +5,136 @@
<form>
<fieldset
class=
"source-fieldset"
>
<legend>
Base
</legend>
<label>
Color:
<input
type=
"text"
[(value)]=
"baseColor"
(change)=
"baseColor = $event.target.value"
placeholder=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
title=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
></label>
<div
class=
"source"
*ngIf=
"baseColor"
>
<div
[style.background-color]=
"baseColor"
>
</div>
<div>
<label>
Color:
<input
type=
"text"
[(value)]=
"baseColor"
(change)=
"baseColor = $event.target.value"
placeholder=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
title=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
></label>
<div
class=
"source"
*ngIf=
"baseColor"
>
<div
[style.background-color]=
"baseColor"
>
</div>
</div>
</div>
</fieldset>
<fieldset
class=
"additionnal"
>
<legend>
Additionnal
</legend>
<div
class=
"luminosity"
>
<label>
<span>
Luminosity [-1; 1]:
</span><input
type=
"number"
min=
"-1.000"
max=
"1.000"
step=
"0.001"
[value]=
"luminosity"
(change)=
"luminosity = $event.target.value"
></label>
</div>
<div
class=
"red"
>
<label><span>
Red [-256; 256]:
</span><input
type=
"number"
min=
"-256"
max=
"256"
step=
"1"
[value]=
"red"
(change)=
"red = $event.target.value"
></label>
</div>
<div
class=
"green"
>
<label><span>
Green [-256; 256]:
</span><input
type=
"number"
min=
"-255"
max=
"256"
step=
"1"
[value]=
"green"
(change)=
"green = $event.target.value"
></label>
</div>
<div
class=
"blue"
>
<label><span>
Blue [-256; 256]:
</span><input
type=
"number"
min=
"-255"
max=
"256"
step=
"1"
[value]=
"blue"
(change)=
"blue = $event.target.value"
></label>
</div>
<div
class=
"hue"
>
<label><span>
Hue [-360; 360]°:
</span><input
type=
"number"
max=
"-360"
max=
"360"
step=
"1"
[value]=
"hue"
(change)=
"hue = $event.target.value"
></label>
</div>
<div
class=
"saturation"
>
<label><span>
Saluration [-100; 100]%:
</span><input
type=
"number"
min=
"-100"
max=
"100"
step=
"1"
[value]=
"saturation"
(change)=
"saturation = $event.target.value"
></label>
</div>
<div
class=
"value"
>
<label><span>
Value [-100; 100]%:
</span><input
type=
"number"
min=
"-100"
max=
"100"
step=
"1"
[value]=
"value"
(change)=
"value = $event.target.value"
></label>
</div>
<div
class=
"maskColor"
>
<label><span>
Mask color:
</span><input
type=
"text"
[value]=
"maskColor"
(change)=
"maskColor = $event.target.value"
placeholder=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
title=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
></label>
</div>
<div
class=
"maskOpacity"
>
<label><span>
+ Mask opacity [0; 1]:
</span><input
type=
"number"
min=
"0"
max=
"1"
step=
"0.001"
[value]=
"maskOpacity"
(change)=
"maskOpacity = $event.target.value"
></label>
</div>
<div
class=
"alpha"
>
<label><span>
Alpha [-1; 1]:
</span><input
type=
"number"
min=
"-1.000"
max=
"1.000"
step=
"0.001"
[value]=
"alpha"
(change)=
"alpha = $event.target.value"
></label>
</div>
<div
class=
"button"
>
<button
type=
"button"
(click)=
"change()"
>
Change
</button>
<div>
<div
class=
"luminosity"
>
<label>
<span>
Luminosity [-1; 1]:
</span><input
type=
"number"
min=
"-1.000"
max=
"1.000"
step=
"0.001"
[value]=
"luminosity"
(change)=
"luminosity = $event.target.value"
></label>
</div>
<div
class=
"red"
>
<label><span>
Red [-256; 256]:
</span><input
type=
"number"
min=
"-256"
max=
"256"
step=
"1"
[value]=
"red"
(change)=
"red = $event.target.value"
></label>
</div>
<div
class=
"green"
>
<label><span>
Green [-256; 256]:
</span><input
type=
"number"
min=
"-255"
max=
"256"
step=
"1"
[value]=
"green"
(change)=
"green = $event.target.value"
></label>
</div>
<div
class=
"blue"
>
<label><span>
Blue [-256; 256]:
</span><input
type=
"number"
min=
"-255"
max=
"256"
step=
"1"
[value]=
"blue"
(change)=
"blue = $event.target.value"
></label>
</div>
<div
class=
"hue"
>
<label><span>
Hue [-360; 360]°:
</span><input
type=
"number"
max=
"-360"
max=
"360"
step=
"1"
[value]=
"hue"
(change)=
"hue = $event.target.value"
></label>
</div>
<div
class=
"saturation"
>
<label><span>
Saluration [-100; 100]%:
</span><input
type=
"number"
min=
"-100"
max=
"100"
step=
"1"
[value]=
"saturation"
(change)=
"saturation = $event.target.value"
></label>
</div>
<div
class=
"value"
>
<label><span>
Value [-100; 100]%:
</span><input
type=
"number"
min=
"-100"
max=
"100"
step=
"1"
[value]=
"value"
(change)=
"value = $event.target.value"
></label>
</div>
<div
class=
"maskColor"
>
<label><span>
Mask color:
</span><input
type=
"text"
[value]=
"maskColor"
(change)=
"maskColor = $event.target.value"
placeholder=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
title=
"black, #000, rgb(0,0,0), hsl(0,0%,0%)"
></label>
</div>
<div
class=
"maskOpacity"
>
<label><span>
+ Mask opacity [0; 1]:
</span><input
type=
"number"
min=
"0"
max=
"1"
step=
"0.001"
[value]=
"maskOpacity"
(change)=
"maskOpacity = $event.target.value"
></label>
</div>
<div
class=
"alpha"
>
<label><span>
Alpha [-1; 1]:
</span><input
type=
"number"
min=
"-1.000"
max=
"1.000"
step=
"0.001"
[value]=
"alpha"
(change)=
"alpha = $event.target.value"
></label>
</div>
<div
class=
"button"
>
<button
type=
"button"
(click)=
"change()"
>
Change
</button>
</div>
</div>
</fieldset>
</form>
<aside>
<fieldset
class=
"result-fieldset"
>
<legend>
Result
</legend>
<div
class=
"result"
>
<div
[style.background-image]=
"gradient"
>
</div>
</div>
<div
class=
"value-result"
>
<span>
Hexa:
</span>
<textarea
readonly
>
{{colorHex || '--'}}
</textarea>
<div>
<div
class=
"result"
>
<div
[style.background-color]=
"colorHex"
>
</div>
<div
[style.background-image]=
"gradient"
>
</div>
</div>
</div
>
<div
class=
"value-result"
>
<span>
RGB:
</span
>
<textarea
readonly
>
{{colorRgb || '--'}}
</textarea
>
<div
class=
"result"
>
<
div
[style.background-color]=
"colorRgb"
>
<
/div>
<div
class=
"value-result"
>
<span>
Hexa:
</span
>
<textarea
readonly
>
{{colorHex || '--'}}
</textarea
>
<div
class=
"result"
>
<div
[style.background-color]=
"colorHex"
>
</div
>
</div>
</div>
</div>
<div
class=
"value-result"
>
<span>
HSL:
</span>
<textarea
readonly
>
{{colorHsl || '--'}}
</textarea>
<div
class=
"result"
>
<div
[style.background-color]=
"colorHsl"
>
</div>
<div
class=
"value-result"
>
<span>
RGB:
</span>
<textarea
readonly
>
{{colorRgb || '--'}}
</textarea>
<div
class=
"result"
>
<div
[style.background-color]=
"colorRgb"
>
</div>
</div>
</div>
<div
class=
"value-result"
>
<span>
HSL:
</span>
<textarea
readonly
>
{{colorHsl || '--'}}
</textarea>
<div
class=
"result"
>
<div
[style.background-color]=
"colorHsl"
>
</div>
</div>
</div>
</div>
</fieldset>
...
...
src/app/app.component.scss
View file @
93dba3fa
...
...
@@ -30,7 +30,7 @@ aside {
padding
:
0
15px
}
.additionnal
{
.additionnal
>
div
{
display
:
grid
;
width
:
100%
;
grid-template
:
...
...
@@ -106,7 +106,7 @@ button {
}
}
.source-fieldset
{
.source-fieldset
>
div
{
display
:
flex
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment