Skip to content

Commit

Permalink
Add missing integer kind 'ik'
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Feb 23, 2024
1 parent 28a1789 commit 72937fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example/demo_color.f90
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ program demo_color


! Set the color using a decimal value
call custom_color%set(name='custom_color', decimal=16088896)
call custom_color%set(name='custom_color', decimal=16088896_ik)

! Convert the color to other color spaces
call custom_color%convert('decimal2all')
Expand Down
4 changes: 2 additions & 2 deletions src/forcolor.f90
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ end subroutine cmyk_to_rgb
!> author: Seyed Ali Ghasemi
elemental pure subroutine hsv_to_rgb(h, s, v, r, g, b)
real(rk), intent(in) :: h, s, v
integer, intent(out) :: r, g, b
integer(ik), intent(out) :: r, g, b
real(rk) :: c, h_prime, x, m
real(rk) :: h_dash, r1, g1, b1

Expand Down Expand Up @@ -872,7 +872,7 @@ end subroutine rgb_to_hsv
!===============================================================================
!> author: Seyed Ali Ghasemi
elemental pure subroutine rgb_to_hsl(r, g, b, h, s, l)
integer, intent(in) :: r, g, b
integer(ik), intent(in) :: r, g, b
real(rk), intent(out) :: h, s, l
real(rk) :: rn, gn, bn
real(rk) :: cmax, cmin
Expand Down
2 changes: 1 addition & 1 deletion test/test26.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ program example26


! Set the color using a decimal value
call custom_color%set(name='custom_color', decimal=16088896)
call custom_color%set(name='custom_color', decimal=16088896_ik)

! Convert the color to other color spaces
call custom_color%convert('decimal2all')
Expand Down
4 changes: 2 additions & 2 deletions test/test27.f90
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
program example27

use forimage, only: color
use forimage, only: ik, color
implicit none

type(color) :: custom_color, nearest_color

call custom_color%set(name='custom_color', decimal=16711680)
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')
Expand Down

0 comments on commit 72937fe

Please sign in to comment.