hex_to_rgb Subroutine

private pure elemental subroutine hex_to_rgb(hex, r, g, b)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: hex
integer(kind=ik), intent(out) :: r
integer(kind=ik), intent(out) :: g
integer(kind=ik), intent(out) :: b

Called by

proc~~hex_to_rgb~~CalledByGraph proc~hex_to_rgb hex_to_rgb proc~convert color%convert proc~convert->proc~hex_to_rgb proc~initialize_colors initialize_colors proc~initialize_colors->proc~convert proc~set color%set proc~initialize_colors->proc~set program~demo_color demo_color program~demo_color->proc~convert proc~find_nearest color%find_nearest program~demo_color->proc~find_nearest proc~print_available_colors color%print_available_colors program~demo_color->proc~print_available_colors proc~save_available_colors color%save_available_colors program~demo_color->proc~save_available_colors program~demo_color->proc~set program~example26 example26 program~example26->proc~convert program~example26->proc~set program~example27 example27 program~example27->proc~convert program~example27->proc~find_nearest program~example27->proc~set proc~find_nearest->proc~initialize_colors proc~print_available_colors->proc~initialize_colors proc~save_available_colors->proc~initialize_colors proc~set_by_name color%set_by_name proc~set_by_name->proc~initialize_colors proc~set->proc~set_by_name program~example29 example29 program~example29->proc~print_available_colors program~example29->proc~save_available_colors program~example28 example28 program~example28->proc~set

Source Code

   elemental pure subroutine hex_to_rgb(hex, r, g, b)
      character(len=*), intent(in)  :: hex
      integer(ik),      intent(out) :: r, g, b

      read(hex(2:3), '(z2)') r
      read(hex(4:5), '(z2)') g
      read(hex(6:7), '(z2)') b
   end subroutine hex_to_rgb