Controlling Four LED's w/potentiometer

Objective :
As I turn the potentiometer up, an LED gradually turns on. Such as a quarter turn activates a blue LED, half turn activates green LED, three quarter is a yellow LED, then all the way is a red LED.

Problem :
I have doubt in the coding itself. NOT the circuit and there is No error message in the code. All lights but red are on and will not do anything else.

Request :
Look at the code and see if there is an issue in terminology and such.

In advanced ~ any and all time to read this and look at the code is much, much appreciated.

int analogPin =  A0; //Potentiometer
int blue = 2; //First LED
int green = 3;//Second
int yellow = 4;//Third
int red = 5;//Fourth
int val;//Declaring Value


void setup( ) {
 
  pinMode(analogPin, INPUT);//Declaring Input for Potentiometer
  pinMode(blue, OUTPUT);//Output for first LED
  pinMode(green, OUTPUT);//Second
  pinMode(yellow, OUTPUT);//Third
  pinMode(red, OUTPUT);//Fourth
}

void loop( ) {
val = analogRead(analogPin);//Read the potentiometer
val = map(val, 0, 1023, 0, 255);//map the results
  if (val==0, val<=255){
   digitalWrite(blue, HIGH); }//Light the first LED in range 0-225
 else{
  digitalWrite(blue, LOW);}//Turn off first LED otherwise
  
 if(val>255, val<=510){
  digitalWrite(green, HIGH); }//Second LED
  else{
  digitalWrite(green, LOW);}
  
 if(val>510, val<=765){
  digitalWrite(yellow, HIGH); }//Third LED
  else{
  digitalWrite(yellow, LOW);}
  
 if(val>765, val==1023){
  digitalWrite(red, HIGH); }//Fourth LED
  else{
  digitalWrite(red, LOW);}
}
if (val==0, val<=255){

Not sure what you intended that to do but it is definitely bad syntax. Do you mean to have an && in there? What were you hoping the comma would do?

You should also think about this line:

val = map(val, 0, 1023, 0, 255);

That's going to mean val has a max value of 255. So the tests for it being greater than that will never be true.

int analogPin =  A0; //Potentiometer
int blue = 2; //First LED
int green = 3;//Second
int yellow = 4;//Third
int red = 5;//Fourth
int val;//Declaring Value


void setup( ) {
 
  pinMode(analogPin, INPUT);//Declaring Input for Potentiometer
  pinMode(blue, OUTPUT);//Output for first LED
  pinMode(green, OUTPUT);//Second
  pinMode(yellow, OUTPUT);//Third
  pinMode(red, OUTPUT);//Fourth
}

void loop( ) {
val = analogRead(analogPin);//Read the potentiometer
val = map(val, 0, 1023, 0, 1023);//map the results
{ if (val<=255) digitalWrite(blue, HIGH); }//Light the first LED
  
{ if(val>255)digitalWrite(green, HIGH); }//Second LED
  
{ if(val>765)digitalWrite(yellow, HIGH); }//Third LED
  
{ if(val==1023)digitalWrite(red, HIGH); }//Fourth LED
}

I simplified it to just turn on an LED the further the Pot went, Does this fix Syntax and Map?

val = map(val, 0, 1023, 0, 1023);

I think this takes the cake for most useless line of the day. Can you describe in words what you think this is doing for you? I'm not sure how to set you straight because I can't tell what your thinking is here. Either way, you might as well delete this line if you don't want it to change the value of the variable at all.

Why do you have the braces around your if statements? Go look at some Example codes and look at how if statements are normally written.