#test -Method1
#I use white and black to run

par(mfrow = c(1, 1))
b2p1 <- colorRampPalette(c("black", "white"))
b2p2 <- colorRamp(c("black", "white"))
pie(rep(1, 50), col = b2p1(50), border = b2p1(50), main = "white-gray-black")

#just try.. -Method2 (lecture note)
grDevices::gray(level=1)
## [1] "#FFFFFF"
'?gray'
## [1] "?gray"
'?GRAY'
## [1] "?GRAY"
par(mar=c(1,1,1,1))
col_gray <- rep(1, 50)
names(col_gray) <- unique(gsub('[0-294]+', 
                                '', 
                                colors()[grep(colors(), pattern="gray")]))
pie(col_gray, 
    col=names(col_gray), 
    radius=.8, cex=.65, clockwise=T)

t(t(palette()))
##      [,1]     
## [1,] "black"  
## [2,] "red"    
## [3,] "green3" 
## [4,] "blue"   
## [5,] "cyan"   
## [6,] "magenta"
## [7,] "yellow" 
## [8,] "gray"