% ShowRGB
% Displays 125 different colors

close all
figure
set(gcf,'Position',[100 100 600 600])
axis equal off
hold on
for r = 0:.25:1
    % Display all colors with red value r...
    for g = 0:.25:1
        % Display all colors with red value r and green value g...
        for b = 0:.25:1
            % Display the color with red value r, green value g, and blue
            % value b...
            c = [r g b];
            fill([0 1 1 0],[0 0 1 1],c)
            title(sprintf('[ r g b ] = [ %4.2f  %4.2f  %4.2f]',r,g,b),'FontSize',18)
            pause(.2)
        end
    end
end
hold off