Sfoglia il codice sorgente

Converts to function

main
Eric Amodio 1 anno fa
parent
commit
b68a125657
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      src/system/color.ts

+ 2
- 2
src/system/color.ts Vedi File

@ -44,9 +44,9 @@ export function mix(color1: string, color2: string, percentage: number) {
)}, ${mixChannel(a1, a2, percentage)})`;
}
const mixChannel = (channel1: number, channel2: number, percentage: number) => {
function mixChannel(channel1: number, channel2: number, percentage: number) {
return channel1 + ((channel2 - channel1) * percentage) / 100;
};
}
export function scale(value1: string, value2: string, steps: number): string[] {
const colors = [];

Caricamento…
Annulla
Salva