Q:

Hexadecimal colors in ggplot not colored as expected

EDIT:
I asked a question which boils down to this:  
"How can I get ggplot to use hexadecimal colors?"  
The answer by MrFick was excellent.  
My original question had a terrible typo (read the comments). Instead of deleting this flawed question, I'd recommend just not reading anything below this and then reading the accepted solution. Thanks.
:END OF EDIT
I have plotted a few geom_segment layers, to make what looks like a vertical bar.
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="green"), size=10)
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="blue"), size=10)
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="red"), size=10)
p

This gives me:

For some reason, when I try to replace red with "#CC6666", replace green with "#9999CC", and replace blue with "#66CC99", as such,
q <- ggplot()
q <- q + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="#66CC99"), size=10)
q <- q + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="#9999CC"), size=10)
q <- q + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="#CC6666"), size=10)

I get:

Do I somehow need to reset the colors after each plot? And why would I need to do that?  
(FFIW, I'm also working in Shiny, where I'm making a set of 6 plots, dynamically. If this is an issue relating to how color is defined in an environment, I might have some extra pain.)
Any help would be appreciated. 
The data lives here and the code is here:
library(ggplot2)
library(gridExtra)

#DF_for_plotting lives here: https://www.dropbox.com/s/6hkc3mth9oimlk5/DF_for_plotting.csv?dl=0

p <- ggplot()
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="green"), size=10)
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="blue"), size=10)
p <- p + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="red"), size=10)

q <- ggplot()
q <- p + geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="#66CC99"), size=10)
q <- p + geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="#9999CC"), size=10)
q <- p + geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="#CC6666"), size=10)

grid.arrange(p,q, ncol=2)

A:

If you want to specify a literal color value in a geom_segment, you should not include it in the aes(). For example using this test data
DF_for_plotting <- data.frame(
    variable=rep("StrpCnCor",4),
    value=c(0, 50.79330935, 81.127731, 100)
)

you can do
ggplot() +
    geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1), colour="green", size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1), colour="blue", size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1), colour="red", size=10)

or with hex colors
ggplot() +
    geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1), colour="#9999CC", size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1), colour="#66CC99", size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1), colour="#CC6666", size=10)

Although because you're not mapping anything to the color aesthetic, no legend will be provided.
When you put it in the aes(), you're not specifying a literal value, you are just specifying a literal value to associate with a color it doesn't matter if you use aes(color="red") or aes(color="determination"); it just treats it as a literal character value and will use it's own color palate to assign a color to that character value. You can specify your own colors with scale_fill_manual For example
ggplot() +
    geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="a"), , size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="b"), , size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="c"),  size=10) + 
    scale_color_manual(values=c(a="green",b="blue",c="red"))

ggplot() +
    geom_segment(data=DF_for_plotting, aes(x=value[1], xend=value[2]-0.001, y=1, yend=1, colour="a"), , size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[2], xend=value[3]-0.001, y=1, yend=1, colour="b"), , size=10) +
    geom_segment(data=DF_for_plotting, aes(x=value[3], xend=value[4]-0.001, y=1, yend=1, colour="c"),  size=10) + 
    scale_color_manual(values=c(a="#9999CC",b="#66CC99",c="#CC6666"))

Here i called the three groups "a", "b", and "c" but you could also call then "green","blue","red" if you want -- it just seems odd to have a legend that tells you what color is green.

