error: '_red' was not declared in this scope (LIBRARY)

Hello guys,

I am making a program for color manipulation on a RGB.
Later in the program it would be very useful to have an instance of each color.
Therefore I followed this simple tutorial provided by arduino: Arduino - LibraryTutorial
I created a library named Color. But when I compile it the following error message shows up:

C:\Users\XPS15\Documents\Arduino\libraries\Color\Color.cpp: In function ‘void setBlueValue(int)’:

C:\Users\XPS15\Documents\Arduino\libraries\Color\Color.cpp:46:3: error: ‘_blue’ was not declared in this scope

_blue = value;

There are 2 of the same errors for the variables _green and _red. There are no further errors.
I tried finding a solution online, but I couldn’t find much on this topic. I hope anyone will help me figure out what’s wrong with my code.

Sketch

#include <Color.h>
#define blueLed 9
#define greenLed 10
#define redLed 11
#define remoteLed 12
Color red(255,0,0, "red");
Color green(0,255,0, "green");
Color blue(0,0,255, "blue");
Color yellow(255,255,0, "yellow");
Color cyan(0,255,255, "cyan");
Color magenta(255,0,255, "magenta");

void setup() {
  pinMode(redLed, OUTPUT);
  pinMode(greenLed, OUTPUT);
  pinMode(blueLed, OUTPUT);
  pinMode(remoteLed, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  // some code
}

Color.h

#ifndef Color_h
#define Color_h

#include "Arduino.h"

class Color
{
  public:
    Color(int red, int green, int blue, String name);
	void setRedValue(int value);
	void setGreenValue(int value);
	void setBlueValue(int value);
	int getRedValue();
	int getGreenValue();
	int getBlueValue();
	String getName();
  private:
    int _red;
	int _green;
	int _blue;
	String _name;
};

#endif

Color.cpp

#include "Arduino.h"
#include "Color.h"

Color::Color(int red, int green, int blue, String name)
{
  _red = red;
  _green = green;
  _blue = blue;
  _name = name;
}

String Color::getName()
{
  return _name;
}

int Color::getRedValue()
{
  return _red;
}

int Color::getGreenValue()
{
  return _green;
}

int Color::getBlueValue()
{
  return _blue;
}

void setRedValue(int value)
{
  _red = value;
}

void setGreenValue(int value)
{
  _green = value;	
}

void setBlueValue(int value)
{
  _blue = value;
}

Do you see an important difference between these two functions?

int Color::getBlueValue()
{
  return _blue;
}


void setBlueValue(int value)
{
  _blue = value;
}

setRedValue and the similar functions for green and blue are missing something important. You can't access member variables from a function that isn't a member of the class.

vaj4088:
Do you see an important difference between these two functions?

int Color::getBlueValue()

{
  return _blue;
}

void setBlueValue(int value)
{
  _blue = value;
}

Yes I do now (facepalm). I can't believe I didn't see that. Thank you