You are here

function rtf::hex2rgb in Bibliography Module 6.2

Same name and namespace in other branches
  1. 6 class_rtf.php \rtf::hex2rgb()
  2. 7 modules/rtf/rtf_export.inc \rtf::hex2rgb()
  3. 7.2 modules/rtf/rtf_export.inc \rtf::hex2rgb()
1 call to rtf::hex2rgb()
rtf::addColour in modules/rtf/rtf_export.inc

File

modules/rtf/rtf_export.inc, line 158

Class

rtf

Code

function hex2rgb($hexcode) {
  $hexcode = str_replace("#", "", $hexcode);
  $rgb = array();
  $rgb["red"] = hexdec(substr($hexcode, 0, 2));
  $rgb["green"] = hexdec(substr($hexcode, 2, 2));
  $rgb["blue"] = hexdec(substr($hexcode, 4, 2));
  $this->colour_rgb = $rgb;
}