aboutsummaryrefslogtreecommitdiff
path: root/sandbox/test-projekat-danijel/frontend/src/app/page-one/page-one.component.html
blob: 5c8527f9246fe6abb4126429ed7ce0232826859e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div style="display: flex; flex-direction: row;">
    <div>
        <label for="red">CRVENA</label>
        <br>
        <input type="number" min="0" max="255" [(ngModel)]="red" name="red">
    </div>
    <div>
        <label for="green">ZELENA</label>
        <br>
        <input type="number" min="0" max="255" [(ngModel)]="green" name="green">
    </div>
    <div>
        <label for="blue">PLAVA</label>
        <br>
        <input type="number" min="0" max="255" [(ngModel)]="blue" name="blue">
    </div>
</div>
<button type="button" (click)="submit()" [style.backgroundColor]="'rgb('+red+','+green+','+blue+')'"
    [style.color]="(red+green+blue>255*1.5 ? '#000':'#fff')">
    DODAJ BOJU
</button>
<br><br>
<div [style.backgroundColor]="color" style="width: 200px; height: 40px;"></div>

<br>
<button type="button" (click)="goToColors()">POGLEDAJ BOJE</button>