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>
<div class="row ms-1 me-1"> <div class="row ms-1 me-1">
<label class="col col-form-label system charted"> <div class="col col-form-label system charted">
Main color in RGB: Where to get RGB matrix:
</label>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1R" name="color1R">
</div> </div>
<div class="col-1 system charted p-0"> <div class="col-auto system charted p-0">
<input type="text" class="form-control" id="color1G" name="color1G"> <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>
<div class="col-1 system charted p-0"> <div class="col-auto system charted p-0">
<input type="text" class="form-control" id="color1B" name="color1B"> <div class="form-check form-check-inline">
</div> <input type="radio" class="form-check-input" id="matrixSourceEDHM" name="matrixSource" value="EDHM">
</div> <label for="matrixSourceEDHM" class="form-check-label">
EDHM XML-Profile.ini
<div class="row ms-1 me-1"> </label>
<label class="col col-form-label system charted"> </div>
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> </div>
</div> </div>
</div> </div>

View file

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

View file

@ -19,9 +19,6 @@ export class Settings {
minValue: number; minValue: number;
maxDistance: number; maxDistance: number;
color1?: {red: number, green: number, blue: number};
color2?: {red: number, green: number, blue: number};
private constructor(isPackaged: boolean) { private constructor(isPackaged: boolean) {
if (!isPackaged && os.platform() === 'linux') { if (!isPackaged && os.platform() === 'linux') {
this.#file = '/mnt/c/Users/marle/ed-safari-settings.json'; 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'); const row = $('<div>').addClass('row ms-1 me-1');
row.attr('id', system.SystemAddress); row.attr('id', system.SystemAddress);
// This is probably still the default 'true' value, but check in case the fetch() was quick. // 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 // name
const name = $('<div>').addClass(`col system ${chartedStyle}`); const name = $('<div>').addClass(`col system ${chartedStyle}`);

View file

@ -11,6 +11,7 @@ import { Settings } from './models/Settings';
import { UI } from './models/UI'; import { UI } from './models/UI';
import { Body } from './models/Body'; import { Body } from './models/Body';
import { EDSM } from './models/EDSM'; import { EDSM } from './models/EDSM';
import { blend } from './assets/blend';
// Grab app.isPackaged from main process // Grab app.isPackaged from main process
let isPackaged = false; let isPackaged = false;
@ -129,3 +130,7 @@ edsm.on('SYSTEM_APPRAISED', (system) => {
UI.setValue(systemRow, system.estimatedValueMapped); 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);