diff --git a/src/forcolor.f90 b/src/forcolor.f90 index 457c7ee..9a85582 100644 --- a/src/forcolor.f90 +++ b/src/forcolor.f90 @@ -39,6 +39,9 @@ module forcolor procedure, private :: get_hsv procedure, private :: get_hsl procedure, private :: get_xyz + procedure :: get_r + procedure :: get_g + procedure :: get_b procedure :: print procedure, private :: print_name procedure, private :: print_rgb @@ -389,6 +392,36 @@ end subroutine get !=============================================================================== + !=============================================================================== + !> author: Seyed Ali Ghasemi + elemental pure function get_r(this) result(r) + class(color), intent(in) :: this + integer(ik) :: r + r = this%r + end function + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + elemental pure function get_g(this) result(g) + class(color), intent(in) :: this + integer(ik) :: g + g = this%g + end function + !=============================================================================== + + + !=============================================================================== + !> author: Seyed Ali Ghasemi + elemental pure function get_b(this) result(b) + class(color), intent(in) :: this + integer(ik) :: b + b = this%b + end function + !=============================================================================== + + !=============================================================================== !> author: Seyed Ali Ghasemi elemental pure subroutine get_name(this, name)