NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServicePalette manages Bootstrap colour palettes and SCSS
compilation. It parses swatch files for colour variables, stores
them in def_colour_palette, and compiles SCSS templates into
minified CSS using libsass.
Colour resolution and palette read/write are delegated to
ObjPalette in factory.core — this service only handles
swatch parsing and SCSS compilation.
ObjServicePalette (service layer)
|
├── parse_swatch() — read SCSS variables
├── compile_scss() — SCSS → minified CSS
└── load_palette_map() — delegates to ObjPalette
|
ObjPalette (core layer)
├── get_palette() — resolve active palette
├── get_color() — colour name → hex
└── save() — persist to DB
Reads Bootstrap _variables.scss files from
resource.style/factory.swatch/{swatch_name}/ and extracts
$marker: value pairs for 30 Bootstrap colour markers.
Handles variable references (e.g. $primary: $blue resolves
to blue's hex value).
white, gray-100..gray-900, black,
blue, indigo, purple, pink, red,
orange, yellow, green, teal, cyan,
primary, secondary, success, info,
warning, danger, light, dark,
body-bg, body-color
Reads .scss files from resource.style/{package}/, replaces
~marker~ placeholders with palette colours, and compiles to
.min.css via libsass.
libsass — SCSS to CSS compiler (pip install libsass)ObjPalette — colour resolution and DB accessParse a single swatch's _variables.scss for colour variables.
Parse all swatches in resource.style/factory.swatch/.
Stores each in def_colour_palette.
Compile SCSS templates for the active package. Returns count
of compiled files.
Load the active palette via ObjPalette.get_palette() and
resolve all colours to hex values.
| Command | Result Key | Description |
|---|---|---|
swatches |
_palette_result |
Parse all swatches to DB |
compile |
_palette_result |
Load palette + compile SCSS |
load |
_palette_result (JSON) |
Return active palette map |
# Parse all Bootstrap swatches to DB
python ObjServicePalette.py swatches
# Compile SCSS with active palette
python ObjServicePalette.py compile
# Show active palette colours
python ObjServicePalette.py show
Package: homechoice
Palette: 69 colours loaded via ObjPalette
Swatches: 25 Bootstrap themes parsed
Sample: primary=#2780e3, accent=#ff0039
from ObjServicePalette import ObjServiceApi
svc = ObjServiceApi()
palette = svc.load_palette_map()
print(f"Primary: {palette.get('primary')}")
svc.parse_all_swatches()
svc.compile_scss()
Updated : 2026-03-16
cythonize -3 -a -i ObjServicePalette.py
Compiling /home/axion/projects/axion/factory.service/package.core/ObjServicePalette.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.service/package.core/ObjServicePalette.py
Updated : 2026-03-16