Color tweaks

main
mat ess 2022-09-14 23:37:16 -04:00
parent a3ad2913f1
commit 08a8089529
3 changed files with 8 additions and 8 deletions

View File

@ -42,9 +42,8 @@ local function initScreen()
WIDTH, HEIGHT = round2even(width), round2even(height)
CANVAS = love.graphics.newCanvas(WIDTH, HEIGHT)
CANVAS:renderTo(function()
local color = COLORS[1].rgba
color[4] = 0.9
love.graphics.setColor(color)
local c = COLORS[1].rgba
love.graphics.setColor({ c[1], c[2], c[3], 0.9 })
love.graphics.rectangle("fill", 0, 0, WIDTH, HEIGHT)
end)
end

View File

@ -17,12 +17,13 @@ local function initColors()
local scheme = colorbrewer.random(2)
ON = scheme[1]
OFF = scheme[2]
OFF_BG = { OFF[1], OFF[2], OFF[3], 0.9 }
end
local function initScreen()
local width, height = love.graphics.getDimensions()
WIDTH, HEIGHT = round2even(width), round2even(height)
love.graphics.setBackgroundColor(OFF[1], OFF[2], OFF[3], 0.9)
love.graphics.setBackgroundColor(OFF_BG)
end
local function initFont()
@ -167,7 +168,7 @@ function love.draw()
if on then
love.graphics.setColor(ON)
else
love.graphics.setColor(OFF)
love.graphics.setColor(OFF_BG)
end
love.graphics.rectangle("fill", x, y, UNITS, UNITS)
end

View File

@ -3,15 +3,15 @@ require "util"
local function initColors()
local colorbrewer = require("colorbrewer")
COLORS = colorbrewer.random(4)
local c = COLORS[#COLORS]
BG = { c[1], c[2], c[3], 0.9 }
BLACK = { 0, 0, 0, 1 }
end
local function initScreen()
local width, height = love.graphics.getDimensions()
WIDTH, HEIGHT = round2even(width), round2even(height)
local color = COLORS[#COLORS]
color[4] = 0.9
love.graphics.setBackgroundColor(color)
love.graphics.setBackgroundColor(BG)
end
local function initFont()