example27 Program

Uses

  • program~~example27~~UsesGraph program~example27 example27 module~forimage forimage program~example27->module~forimage module~forcolor forcolor module~forimage->module~forcolor module~forimage_parameters forimage_parameters module~forimage->module~forimage_parameters module~lut lut module~forimage->module~lut module~pnm pnm module~forimage->module~pnm module~forcolor->module~forimage_parameters module~forcolor->module~pnm iso_fortran_env iso_fortran_env module~forimage_parameters->iso_fortran_env module~pnm->module~forimage_parameters

Calls

program~~example27~~CallsGraph program~example27 example27 proc~convert color%convert program~example27->proc~convert proc~find_nearest color%find_nearest program~example27->proc~find_nearest proc~set color%set program~example27->proc~set proc~cmyk_to_rgb cmyk_to_rgb proc~convert->proc~cmyk_to_rgb proc~decimal_to_rgb decimal_to_rgb proc~convert->proc~decimal_to_rgb proc~hex_to_rgb hex_to_rgb proc~convert->proc~hex_to_rgb proc~hsl_to_rgb hsl_to_rgb proc~convert->proc~hsl_to_rgb proc~hsv_to_rgb hsv_to_rgb proc~convert->proc~hsv_to_rgb proc~rgb_to_cmyk rgb_to_cmyk proc~convert->proc~rgb_to_cmyk proc~rgb_to_decimal rgb_to_decimal proc~convert->proc~rgb_to_decimal proc~rgb_to_hex rgb_to_hex proc~convert->proc~rgb_to_hex proc~rgb_to_hsl rgb_to_hsl proc~convert->proc~rgb_to_hsl proc~rgb_to_hsv rgb_to_hsv proc~convert->proc~rgb_to_hsv proc~rgb_to_xyz rgb_to_xyz proc~convert->proc~rgb_to_xyz proc~xyz_to_rgb xyz_to_rgb proc~convert->proc~xyz_to_rgb proc~get_rgb color%get_rgb proc~find_nearest->proc~get_rgb proc~initialize_colors initialize_colors proc~find_nearest->proc~initialize_colors proc~set_by_name color%set_by_name proc~set->proc~set_by_name proc~set_cmyk color%set_cmyk proc~set->proc~set_cmyk proc~set_decimal color%set_decimal proc~set->proc~set_decimal proc~set_hex color%set_hex proc~set->proc~set_hex proc~set_hsl color%set_hsl proc~set->proc~set_hsl proc~set_hsv color%set_hsv proc~set->proc~set_hsv proc~set_name color%set_name proc~set->proc~set_name proc~set_rgb color%set_rgb proc~set->proc~set_rgb proc~set_xyz color%set_xyz proc~set->proc~set_xyz proc~initialize_colors->proc~convert proc~initialize_colors->proc~set proc~set_by_name->proc~initialize_colors

Variables

Type Attributes Name Initial
type(color) :: custom_color
type(color) :: nearest_color

Source Code

program example27

   use forimage, only: ik, color
   implicit none

   type(color) :: custom_color, nearest_color

   call custom_color%set(name='custom_color', decimal=16711680_ik)

   print'(a)', 'Find the nearest color to the custom color'
   call custom_color%convert('decimal2rgb')
   call custom_color%find_nearest(nearest_color)

   call nearest_color%print()

end program example27