Set rgba from color: [r, g, b] (alpha unchanged) or [r, g, b, a].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | rgba(4) |
[r, g, b, a] |
||
| real(kind=wp), | intent(in) | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
pure subroutine set_rgba(rgba, color) real(wp), intent(inout) :: rgba(4) !! [r, g, b, a] real(wp), intent(in) :: color(:) !! [r, g, b] or [r, g, b, a] (0 to 1) integer :: n n = min(4, size(color)) rgba(1:n) = color(1:n) end subroutine set_rgba