Going to attempt color matrix-ing instead of RGB.

This commit is contained in:
punkfairie 2023-05-14 08:16:30 -07:00
parent f749cb76f7
commit ec2b5b00ab
5 changed files with 27 additions and 34 deletions

View file

@ -45,32 +45,24 @@
</div>
<div class="row ms-1 me-1">
<label class="col col-form-label system charted">
Main color in RGB:
</label>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1R" name="color1R">
<div class="col col-form-label system charted">
Where to get RGB matrix:
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1G" name="color1G">
<div class="col-auto system charted p-0">
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="matrixSource" id="matrixSourceDefault" value="default" checked>
<label for="matrixSourceDefault" class="form-check-label">
GraphicsConfiguration.xml
</label>
</div>
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1B" name="color1B">
</div>
</div>
<div class="row ms-1 me-1">
<label class="col col-form-label system charted">
Accent color in RGB:
</label>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2R" name="color2R">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2G" name="color2G">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2B" name="color2B">
<div class="col-auto system charted p-0">
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" id="matrixSourceEDHM" name="matrixSource" value="EDHM">
<label for="matrixSourceEDHM" class="form-check-label">
EDHM XML-Profile.ini
</label>
</div>
</div>
</div>
</div>

View file

@ -11,12 +11,11 @@
:root {
--background: black;
--main: #F5A804;
--accent-dark: #0026FF;
--accent-light: #17EFF9;
--accent-dark: #000e5f;
--accent-light: #17cbd4;
--secondary-light: #EAA529;
--secondary-dark: #370C03;
/* --secondary-bg: color-mix(in srbg, black, var(--main)); */
--grey-text: #9f9f9f;
--grey-bg: #333333;
@ -51,8 +50,8 @@ body {
background: var(--grey-bg);
}
.uncharted {
color: var(--secondary-light);
background: var(--secondary-dark);
color: var(--accent-light);
background: var(--accent-dark);
}
.hyperspace {

View file

@ -19,9 +19,6 @@ export class Settings {
minValue: number;
maxDistance: number;
color1?: {red: number, green: number, blue: number};
color2?: {red: number, green: number, blue: number};
private constructor(isPackaged: boolean) {
if (!isPackaged && os.platform() === 'linux') {
this.#file = '/mnt/c/Users/marle/ed-safari-settings.json';

View file

@ -159,7 +159,7 @@ export class UI {
const row = $('<div>').addClass('row ms-1 me-1');
row.attr('id', system.SystemAddress);
// This is probably still the default 'true' value, but check in case the fetch() was quick.
const chartedStyle = system.charted ? 'uncharted' : 'uncharted';
const chartedStyle = system.charted ? 'charted' : 'uncharted';
// name
const name = $('<div>').addClass(`col system ${chartedStyle}`);

View file

@ -11,6 +11,7 @@ import { Settings } from './models/Settings';
import { UI } from './models/UI';
import { Body } from './models/Body';
import { EDSM } from './models/EDSM';
import { blend } from './assets/blend';
// Grab app.isPackaged from main process
let isPackaged = false;
@ -128,4 +129,8 @@ edsm.on('SYSTEM_APPRAISED', (system) => {
if (systemRow.length > 0) {
UI.setValue(systemRow, system.estimatedValueMapped);
}
});
});
// const color = blend([245, 168, 4], [0, 0, 0], [0.4, 0.6]);
// const rgb = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
// $('body').css('--secondary-dark', rgb);