Color palette generation and extraction in the shape of a REST API (mostly experiments)
NOT READY YET
apparently there are some nasty nested loops on main that made the program 300% slower.
The color palette for both is pretty much the same, 3 blues, 1 brown, 1 yellow for the sunflower test image.
Just to be clear, i ran the program 3 times and kept the best output, the other 2 outputs only had 1 yellow, one brown and 3 differente blue hues
Built with Rocket.rs on the backend and React.js on the fronent
npm install babel-cli babel-preset-react-app
npx babel --watch react --out-dir build --presets react-app/prod
webpack.config.js
const path = require('path')
module.exports = {
entry: path.join(__dirname, "react", "./login.jsx"),
output: {
path: path.resolve(__dirname, "./build"),
filename: 'login.js'
},
module: {
rules: [
{
test: /\.js|\.jsx$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
}
}
]
},
resolve: {
extensions: ['*', '.js', '.jsx']
}
}
package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack serve",
"build": "webpack"
},
run as npm run build
Theres a way to automatize building all files, might check out later test