[READ-ONLY] Mirror of https://github.com/probablykasper/starchart. GitHub star history graph starchart.kasper.space
chart github github-api github-star graph history star star-history stargazers stars
0

Configure Feed

Select the types of activity you want to include in your feed.

Add more colors

Kasper (Mar 3, 2023, 1:05 PM +0100) 4a44ee1f 7583167e

+19 -5
+19 -5
src/routes/color.ts
··· 1 1 import { TinyColor } from '@ctrl/tinycolor' 2 2 3 - export const hexColors = ['#E91E63', '#0064fa', '#ffdd00', '#FF9800', '#08fd96', '#FFFFFF'] 4 - export const topColors = hexColors.map((hexColor) => { 3 + export const colors = [ 4 + 'hsl(340, 100%, 52%)', 5 + 'hsl(216, 100%, 49%)', 6 + 'hsl(36, 100%, 50%)', 7 + 'hsl(52, 100%, 50%)', 8 + 'hsl(155, 100%, 45%)', 9 + 'hsl(257, 100%, 61%)', 10 + 'hsl(188, 90%, 52%)', 11 + 'hsl(306, 100%, 52%)', 12 + 'hsl(0, 0%, 100%)', 13 + ] 14 + export const hexColors = colors.map((hexColor) => { 15 + const color = new TinyColor(hexColor) 16 + return color.brighten(10).toHexString() 17 + }) 18 + export const topColors = colors.map((hexColor) => { 5 19 const color = new TinyColor(hexColor) 6 20 color.setAlpha(0.5) 7 - return color.saturate(100).toRgbString() 21 + return color.saturate(100).toHslString() 8 22 }) 9 - export const bottomColors = hexColors.map((hexColor) => { 23 + export const bottomColors = colors.map((hexColor) => { 10 24 const color = new TinyColor(hexColor) 11 25 color.setAlpha(0) 12 - return color.darken(0).toRgbString() 26 + return color.darken(0).toHslString() 13 27 })