Skip to content

Commit cc56067

Browse files
committed
Signal on transparent problem colors
1 parent e81837d commit cc56067

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webapp/src/Service/CheckConfigService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ public function checkContestsValidate(): ConfigCheckItem
474474
if (empty($cp->getColor())) {
475475
$result = ($result === 'E' ? 'E' : 'W');
476476
$cperrors[$cid] .= " - No color for problem `" . $cp->getShortname() . "` in contest c" . $cid . "\n";
477+
} elseif (count(Utils::parseHexColor($cp->getColor())) === 4 && Utils::parseHexColor($cp->getColor())[3] !== 255) {
478+
$result = ($result === 'E' ? 'E' : 'W');
479+
$cperrors[$cid] .= " - Semi-transparent color for problem `" . $cp->getShortname() . "` in contest c" . $cid . "\n";
477480
}
478481
}
479482
}

0 commit comments

Comments
 (0)