function [crgb] = state_color(state_num)
%function [state_num state_color] = state_finder(str)
%             NotRunning = 0,
%             RunEngrTest,
%             InitializeMission,
%             InitializeProfile,
%             SurfaceOpsSetBellows,
%             PreMissionDelay,
%             SurfaceOps,
%             ABSetFast,
%             ABRetractSlow,
%             Descend,
%             Anchor,
%             StartCPMode,
%             DumpCPData,
%             DeAnchor,
%             Ascend,
%             Surface,
%             SetRecoveryMode,
%             ProcessErrors,
%             Exit,
%             lastState


c = [
    255 0 0 ;
    255 0 0 ;
    255 0 0 ; %Initialize Mission, red BAD!!!
    255 102 178 ; %InitializeProfile
    102 102 255 ; %SurfaceOpsSetBellows
    224 224 224 ; %PreMissionDelay
    0 0 255 ;     %SurfaceOps
    204 153 255 ; %ABSetFast
    178 102 255 ; %ABRetractSlow
    127 0 255   ; %Descend
    255 255 0   ; %Anchor - yellow
    255 153 153 ; %StartCPMode
    153 255 255 ; %DumpCPData
    153 255 153 ; %DeAnchor
    0 255 0 ;     %Ascend
    0 0 255 ;     %Park
    255 0 0 ;     %SetRecoveryMode, red
    255 0 0 ; 
    255 102 102 ; %Exit BAD
    255 102 102 ; %last State BAD
    ];

c = c/255; %convert to rgb triplet
if(state_num < 1 || isnan(state_num) )
    crgb = [1 1 1];
else
    crgb = c(state_num,:);
end

        