Though I 'm not certain what
exactly is it that SDL palette does, I could see manipulating the pixels of a sf::Image instead:
sf::Image trikeImage;
trikeImage.loadFromFile("graphics/Unit_Trike.bmp");
sf::Vector2u trikeSize = trikeImage.getSize();
sf::Image trikeGreen;
trikeGreen.create(trikeSize.x, trikeSize.y);
sf::Image trikeBlue;
trikeBlue.create(trikeSize.x, trikeSize.y);
for (int i=0; i<trikeSize.x; ++i){
for (int j=0; j<trikeSize.y; ++j){
sf::Color pixelColor = trikeImage.getPixel(i,j);
sf::Color bluePixel(pixelColor);
sf::Color greenPixel(pixelColor);
if ((pixelColor == sf::Color(125,0,0))
||(pixelColor == sf::Color(214,0,0))
||(pixelColor == sf::Color(60,0,0))
||(pixelColor == sf::Color(89,0,0))
||(pixelColor == sf::Color(153,0,0))
||(pixelColor == sf::Color(182,0,0))
)
{
greenPixel = sf::Color(0,pixelColor.g+pixelColor.r,pixelColor.b, pixelColor.a);
bluePixel = sf::Color(0,pixelColor.g,pixelColor.b+pixelColor.r, pixelColor.a);
}
trikeGreen.setPixel(i,j,greenPixel);
trikeBlue.setPixel(i,j,bluePixel);
}
}