qgis raster palette won't appear
I do not think QGIS currently supports the creation of palettes for rasters as this was mentioned in the book Mastering QGIS which was published in Mar 2015:
Paletted raster band rendering
The paletted raster band renderer applies a single color to a single raster value. QGIS supports the loading of rasters with paletted colors stored within and the changing the color assigned to the raster value. QGIS does not currently support the creation of color palettes for single band rendering. However, existing QGIS layer style files (.qml) that contain palettes can be applied by clicking on the Load Style button in the layer properties.
not sure where You want to go with that, but I would rather use Singleband pseudocolor option to adjust the rasters (data) options of visibility
If you don't have too many values to encode, here's an example file that you could import from the style menu at the bottom to get around the limitations mentioned in the other answers. You just have to save it as someFileName.qml
.
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="2.18.14">
<rasterrenderer opacity="1" alphaBand="0" band="1" type="paletted">
<rasterTransparency/>
<colorPalette>
<paletteEntry value="0" color="#000000" label="0"/>
<paletteEntry value="1" color="#ffffff" label="1"/>
</colorPalette>
</rasterrenderer>
</qgis>
In this example, there is one paletteEntry
for each value I'm trying to color - two in total. Can just add more below to meet your needs.