4 * Class CRM_Utils_ColorTest
7 class CRM_Utils_ColorTest
extends CiviUnitTestCase
{
10 * @dataProvider contrastExamples
12 public function testGetContrast($background, $text) {
13 $this->assertEquals($text, CRM_Utils_Color
::getContrast($background));
16 public function contrastExamples() {
18 array('ef4444', 'white'),
19 array('FAA31B', 'black'),
20 array('FFF000', 'black'),
21 array(' 82c341', 'black'),
22 array('#009F75', 'white'),
23 array('#88C6eD', 'black'),
24 array('# 394ba0', 'white'),
25 array(' #D54799', 'white'),