mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2025-09-06 02:40:39 +00:00
clean repo
This commit is contained in:
1
files/omp/colors/.gitignore
vendored
Normal file
1
files/omp/colors/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
BIN
files/omp/colors/bun.lockb
Executable file
BIN
files/omp/colors/bun.lockb
Executable file
Binary file not shown.
106
files/omp/colors/colors.json
Normal file
106
files/omp/colors/colors.json
Normal file
@@ -0,0 +1,106 @@
|
||||
[
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 209,
|
||||
"end": 259,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.03,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.03,
|
||||
"curve": "easeInQuart"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Main",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 0,
|
||||
"end": 15,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Error",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 60,
|
||||
"end": 70,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Warning",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"steps": 8,
|
||||
"hue": {
|
||||
"start": 122,
|
||||
"end": 146,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"saturation": {
|
||||
"start": 0.75,
|
||||
"end": 1,
|
||||
"rate": 1,
|
||||
"curve": "easeOutQuad"
|
||||
},
|
||||
"brightness": {
|
||||
"start": 1,
|
||||
"end": 0.2,
|
||||
"curve": "linear"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"minorSteps": [0, 1],
|
||||
"name": "Success",
|
||||
"rotation": "clockwise"
|
||||
}
|
||||
}
|
||||
]
|
21
files/omp/colors/index.js
Normal file
21
files/omp/colors/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import color from '@k-vyn/coloralgorithm'
|
||||
import colors from './colors.json' assert { type: 'json' }
|
||||
import fs from 'fs'
|
||||
import yaml from 'yaml'
|
||||
|
||||
const offset = 10
|
||||
const palette = {}
|
||||
for (const { properties, options } of colors) {
|
||||
const result = color.generate(properties, options)
|
||||
const name = result[0].name
|
||||
for (const color of result[0].colors) {
|
||||
palette[`${name.toLowerCase()}-${color.step * offset}`] = color.hex
|
||||
}
|
||||
}
|
||||
|
||||
const configFile = '../main.omp.yaml'
|
||||
const config = fs.readFileSync(configFile, 'utf8')
|
||||
// config.palette = palette
|
||||
const output = yaml.stringify({ palette })
|
||||
|
||||
fs.writeFileSync(configFile, config.replace(/palette:(.|\s)*$/, output))
|
8
files/omp/colors/package.json
Normal file
8
files/omp/colors/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@k-vyn/coloralgorithm": "^1.0.0",
|
||||
"yaml": "^2.2.1"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user