Choose light colors for the groups
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m13s
Run unit tests / unit_tests (pull_request) Successful in 1m54s
Check usage of free licenses / build-static-assets (pull_request) Successful in 27s

This commit is contained in:
Manuel Bustillo 2024-11-04 23:39:44 +01:00
parent 231ea3fda8
commit 5cceb1e6ed
3 changed files with 7 additions and 2 deletions

View File

@ -33,4 +33,5 @@ group :development do
gem 'web-console' gem 'web-console'
end end
gem "solid_queue", "~> 1.0" gem 'chroma'
gem 'solid_queue', '~> 1.0'

View File

@ -84,6 +84,7 @@ GEM
bootsnap (1.18.4) bootsnap (1.18.4)
msgpack (~> 1.2) msgpack (~> 1.2)
builder (3.3.0) builder (3.3.0)
chroma (0.2.0)
coderay (1.1.3) coderay (1.1.3)
concurrent-ruby (1.3.4) concurrent-ruby (1.3.4)
connection_pool (2.4.1) connection_pool (2.4.1)
@ -326,6 +327,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bootsnap bootsnap
chroma
csv csv
debug debug
factory_bot_rails factory_bot_rails

View File

@ -16,6 +16,8 @@ class Group < ApplicationRecord
private private
def set_color def set_color
self.color = "##{SecureRandom.hex(3)}" new_color = "##{SecureRandom.hex(3)}".paint
new_color = new_color.lighten(30) if new_color.dark?
self.color = new_color
end end
end end