[Build] Do full build
This commit is contained in:
@@ -52,6 +52,7 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
||||
'colour-accent-rgba-015': renderColourAsRGBA( palette[ 0 ], 0.15 ),
|
||||
'colour-accent-rgba-011': renderColourAsRGBA( palette[ 0 ], 0.11 ),
|
||||
'colour-accent-rgba-007': renderColourAsRGBA( palette[ 0 ], 0.07 ),
|
||||
'colour-accent-hyprland': util.renderColourAsRGBAHex( palette[ 0 ], 0.8 ),
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
'colour-accent-gradient-1-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 1, gradientMultipliers[ theme ] ) ),
|
||||
'colour-accent-gradient-2-hex': renderColourAsHex( util.getGradientColour( palette[ 0 ], 2, gradientMultipliers[ theme ] ) ),
|
||||
@@ -65,15 +66,18 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
||||
// ── Secondary accent ─────────────────────────────────────────────
|
||||
'colour-accent-2-hex': renderColourAsHex( palette[ 1 ] ),
|
||||
'colour-accent-2-rgb': renderColourAsRGB( palette[ 1 ] ),
|
||||
'colour-accent-2-rgba-07': renderColourAsRGBA( palette[ 1 ], 0.7 ),
|
||||
'colour-accent-2-rgba-05': renderColourAsRGBA( palette[ 1 ], 0.5 ),
|
||||
'colour-accent-2-rgba-03': renderColourAsRGBA( palette[ 1 ], 0.3 ),
|
||||
'colour-accent-2-rgba-02': renderColourAsRGBA( palette[ 1 ], 0.2 ),
|
||||
'colour-accent-2-rgba-015': renderColourAsRGBA( palette[ 1 ], 0.15 ),
|
||||
'colour-accent-2-rgba-01': renderColourAsRGBA( palette[ 1 ], 0.1 ),
|
||||
'colour-accent-2-hyprland': util.renderColourAsRGBAHex( palette[ 1 ], 0.8 ),
|
||||
|
||||
// ── Tertiary accent ──────────────────────────────────────────────
|
||||
'colour-accent-3-hex': renderColourAsHex( palette[ 2 ] ),
|
||||
'colour-accent-3-rgb': renderColourAsRGB( palette[ 2 ] ),
|
||||
'colour-accent-3-hyprland': util.renderColourAsRGBAHex( palette[ 2 ], 0.8 ),
|
||||
|
||||
// ── Background ───────────────────────────────────────────────────
|
||||
'colour-background-hex': renderColourAsHex( colours.background[ theme ] ),
|
||||
@@ -107,6 +111,7 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
||||
// ── Shadow ───────────────────────────────────────────────────────
|
||||
'colour-shadow-hex': renderColourAsHex( colours.shadow[ theme ] ),
|
||||
'colour-shadow-rgb': renderColourAsRGB( colours.shadow[ theme ] ),
|
||||
'colour-shadow-hyprland': util.renderColourAsRGBHex( colours.shadow[ theme ] ),
|
||||
'colour-shadow-rgba-07': renderColourAsRGBA( colours.shadow[ theme ], 0.7 ),
|
||||
'colour-shadow-rgba-05': renderColourAsRGBA( colours.shadow[ theme ], 0.5 ),
|
||||
'colour-shadow-rgba-03': renderColourAsRGBA( colours.shadow[ theme ], 0.3 ),
|
||||
@@ -125,6 +130,7 @@ const build = ( wallpaper, lockpaper, theme ) => {
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
'colour-inactive-background-hex': renderColourAsHex( colours[ 'inactive-background' ][ theme ] ),
|
||||
'colour-inactive-background-rgb': renderColourAsRGB( colours[ 'inactive-background' ][ theme ] ),
|
||||
'colour-inactive-background-hyprland': util.renderColourAsRGBHex( colours[ 'inactive-background' ][ theme ] ),
|
||||
'colour-inactive-background-rgba-07': renderColourAsRGBA( colours[ 'inactive-background' ][ theme ], 0.7 ),
|
||||
'colour-inactive-background-rgba-05': renderColourAsRGBA( colours[ 'inactive-background' ][ theme ], 0.5 ),
|
||||
'colour-inactive-background-rgba-04': renderColourAsRGBA( colours[ 'inactive-background' ][ theme ], 0.4 ),
|
||||
|
@@ -35,11 +35,26 @@ const renderColourAsHex = ( colour ) => {
|
||||
}
|
||||
|
||||
const renderColourAsRGB = ( colour ) => {
|
||||
return `rgb( ${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] } )`
|
||||
return `rgb(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] })`
|
||||
}
|
||||
|
||||
const renderColourAsRGBA = ( colour, ambiance ) => {
|
||||
return `rgba( ${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] }, ${ ambiance } )`
|
||||
return `rgba(${ colour[ 0 ] }, ${ colour[ 1 ] }, ${ colour[ 2 ] }, ${ ambiance })`
|
||||
}
|
||||
|
||||
const renderColourAsRGBHex = ( colour ) => {
|
||||
const hexCol = convert.default.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
||||
return `rgb(${hexCol})`.toLowerCase();
|
||||
}
|
||||
|
||||
function decimalToHex(decimal) {
|
||||
const hexValue = Math.round(decimal * 255);
|
||||
return hexValue.toString(16).padStart(2, '0');
|
||||
}
|
||||
|
||||
const renderColourAsRGBAHex = ( colour, ambiance ) => {
|
||||
const hexCol = convert.default.rgb.hex( colour[ 0 ], colour[ 1 ], colour[ 2 ] );
|
||||
return `rgba(${hexCol}${decimalToHex(ambiance)})`.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +146,8 @@ module.exports = {
|
||||
renderColourAsHex,
|
||||
renderColourAsRGB,
|
||||
renderColourAsRGBA,
|
||||
renderColourAsRGBHex,
|
||||
renderColourAsRGBAHex,
|
||||
themePreProcessor,
|
||||
getGradientColour
|
||||
}
|
||||
|
Reference in New Issue
Block a user