ColorPicker
component was used (very few people were using it and there are much better alternatives available) hx.theme
has been converted to hx.theme()
to better support the modular nature of the new Hexagon (you can find/replace hx.theme
with hx.theme()
and it will continue working) hexagon-dark
theme has been removed, leaving the dist folder to contain the hexagon-light
theme. dist/
- assets/
- hexagon.css
- hexagon.js
dist/
- hexagon.print.css
- hexagon.print.js
dist/assets
directory contains the font files that hexagon uses for the icons. This should be copied along with the other files. dist
directory, however these are not required when copying the pre-built version. import { DatePicker } from 'hexagon-js';
hx.theme()
you will need to add the following to your app, before running any hexagon code: import { theme } from 'hexagon-js';
import currentTheme from 'hexagon-js/dist/hexagon.theme.js';
theme(currentTheme);
...
hx.theme()
import { theme } from 'hexagon-js';
console.log(theme().palette.actionCol);
dist/hexagon.variables.css
for the full list of variables available. :root {
--theme-contrast-body-color: #F9F9F9;
--theme-contrast-border-color: #DBDBE4;
--theme-contrast-color: #F7F7F9;
--theme-contrast-hover-color: #e8e8ee;
--theme-complement-body-color: #393D3D;
--theme-complement-border-color: #313434;
--theme-complement-color: #4A4E4E;
--theme-complement-hover-color: #636868;
--theme-default-body-color: var(--theme-complement-body-color);
--theme-default-border-color: var(--theme-text-color);
--theme-default-color: var(--theme-complement-color);
--theme-default-hover-color: var(--theme-complement-hover-color);
--theme-disabled-color: #050505;
--theme-disabled-background-color: var(--theme-disabled-color);
--theme-disabled-text-color: #6b6b6b;
--theme-text-color: white;
--theme-text-alternate-color: black;
--theme-heading-text-color: white;
--theme-header-text-color: white;
--theme-error-text-color: white;
--theme-body-background-color: #252C2E;
--theme-content-background-color: transparent;
--theme-container-header-background-color: #2C3134;
--theme-container-background-color: #32373A;
--theme-container-border-color: #424749;
--theme-element-background-color: #252C2E;
--theme-header-background-color: #2C3134;
--theme-content-header-background-color: white;
--theme-linkbar-background-color: #373D45;
--theme-divider-color: #4E5355;
--theme-divider-style: solid;
--theme-divider-alt-color: #383B3C;
--theme-input-border-color: #4E5355;
--theme-input-background-color: #2F3639;
--theme-faint-icon-color: rgba(255, 255, 255, 0.3);
--theme-faint-icon-hover-color: rgba(255, 255, 255, 0.6);
--theme-selection-color: #605f0b;
--theme-selection-text-color: #FFF;
--theme-selected-color: #ad7c00;
--theme-selected-text-color: #FFF;
/* Button */
--button-text-alternate-color: var(--theme-text-color);
/* Slider */
--slider-slider-background-color: #DADADA;
/* Table */
--table-row-alt-background-color: #2B3234;
--table-row-hover-background-color: #3D4346;
/* Tabs */
--tabs-default-color: #9F9F9F;
/* Toggle */
--toggle-background-off-color: #495054;
--toggle-background-on-color: #495054;
/* Tree */
--tree-icon-disabled-background-color: #393F42;
--tree-icon-disabled-text-color: #272727;
/* Menu */
--menu-default-hover-color: #42474A;
/* Notice */
--notice-default-color: #393D3D;
}
--theme-xxx
set, you will probably want a custom theme JS as well: const plotColor1 = 'rgb(177,119,190)';
const plotColor2 = 'rgb(90,155,212)';
const plotColor3 = 'rgb(241,90,113)';
const plotColor4 = 'rgb(151,195,102)';
const plotColor5 = 'rgb(250,169,91)';
const plotColor6 = 'rgb(226,212,64)';
const palette = {
defaultCol: '#FFFFFF',
actionCol: '#00ADA8',
positiveCol: '#92BF17',
warningCol: '#D69B24',
negativeCol: '#EC3A65',
infoCol: '#B36ABB',
complementCol: '#4A4E4E',
contrastCol: '#F7F7F9',
lightTextCol: '#000',
darkTextCol: '#FFF',
disabledCol: '#050505',
disabledTextCol: '#6b6b6b',
dividerCol: '#D0D0D0',
};
const customTheme = {
plotColor1,
plotColor2,
plotColor3,
plotColor4,
plotColor5,
plotColor6,
plotColors: [
plotColor1,
plotColor2,
plotColor3,
plotColor4,
plotColor5,
plotColor6,
],
palette,
plot: {
ambientCol: plotColor6,
axisLineCol: palette.dividerCol,
axisTitleTextCol: palette.darkTextCol,
coldCol: plotColor2,
colors: [
plotColor1,
plotColor2,
plotColor3,
plotColor4,
plotColor5,
plotColor6,
],
darkTextCol: palette.darkTextCol,
lightTextCol: palette.lightTextCol,
labelBackgroundCol: palette.complementCol,
gridLineCol: palette.disabledCol,
labelBorderCol: palette.disabledCol,
labelBoxShadow: '1px 1px 1px rgba(0, 0, 0, 0.25)',
labelHeaderBackgroundCol: palette.complementCol,
labelHeaderBorderCol: palette.dividerCol,
labelKeyTextCol: palette.darkTextCol,
labelTextCol: palette.darkTextCol,
negativeCol: plotColor3,
pieSegmentTextCol: palette.lightTextCol,
positiveCol: plotColor4,
tickLineCol: palette.dividerCol,
tickTextCol: palette.darkTextCol,
tickTextSize: '10px',
warmCol: plotColor5,
warningCol: plotColor6,
},
paginator: {
arrowButton: 'n-a',
defaultButton: 'hx-complement',
selectedButton: 'hx-action',
},
};
<script>
const customTheme = {
...
};
hx.theme(customTheme);
</script>
import { theme } from 'hexagon-js';
import customTheme from './custom-theme';
theme(customTheme);
...